**** BEGIN LOGGING AT Mon Jul 02 02:59:58 2012 Jul 02 11:14:10 hello, I'm trying to get the toolchain and image creator for la fonera 2.0n and having some troubles Jul 02 11:14:31 I followed http://trac.fonosfera.org/fon-ng/wiki/build Jul 02 11:15:11 and with previous systems all wer done ok (ubuntu x64 10.10) Jul 02 11:15:44 but with ubuntu x64 12.04 there semm to be troubles with ncurses and zlib Jul 02 11:19:41 prerequisites for ncurses and zlib fails but they were installed, so I get it working changing include/prereq-build.mk Jul 02 11:20:07 but now it seems to fail again zlib: Jul 02 11:21:00 uncomp.c:(.text+0x58): undefined reference to `inflateReset' Jul 02 11:21:19 uncomp.c:(.text+0x99): undefined reference to `inflate' Jul 02 11:21:51 trunk/openwrt/build_dir/host/sqlzma/lzma443/C/7zip/Compress/LZMA_C/libunlzma.a(uncomp.o): In function `sqlzma_init': uncomp.c:(.text+0x3d3): undefined reference to `inflateInit_' Jul 02 11:21:57 some idea? Jul 02 11:22:26 hi qq_ Jul 02 11:22:44 hi! Jul 02 11:22:54 What did you change in prereq-build? Jul 02 11:23:34 I followed this: http://wl500g.info/showthread.php?30036-making-toolchain-fails Jul 02 11:23:56 so: define Require/ncurses echo 'int main(int argc, char **argv) { initscr(); return 0; }' | \ echo -include ncurses.h -x c -o $(TMP_DIR)/a.out -lncurses - endef $(eval $(call Require,ncurses, \ Please install ncurses. (Missing libncurses.so or ncurses.h) \ )) define Require/zlib echo 'int main(int argc, char **argv) { gzdopen(0, "rb"); return 0; }' | \ echo Jul 02 11:26:58 That simply removes the check for ncurses / zlib Jul 02 11:27:26 Reading on in the thread suggests that the check is faulty on newer Ubuntu's, but since you still get an error later on, there is probably another problem Jul 02 11:27:53 Could you try running these two commands? Jul 02 11:27:55 echo 'int main(int argc, char **argv) { gzdopen(0, "rb"); return 0; }' > test.c Jul 02 11:28:31 gcc -include ncurses.h -x c -lncurses test.c Jul 02 11:28:42 ok Jul 02 11:29:02 Uh, the latter is wrong. SHould be: Jul 02 11:29:06 gcc -include ncurses.h -x c -lz test.c Jul 02 11:29:34 gcc -include ncurses.h -x c -lz test.c /tmp/cc3UQzNA.o: In function `main': test.c:(.text+0x1f): undefined reference to `gzdopen' collect2: ld devolvió el estado de salida 1 Jul 02 11:31:29 What zlib dev package do you have installed? I have zlib1g-dev here Jul 02 11:31:34 (Debian testing) Jul 02 11:32:12 and could you try: gcc -include zlib.h -x c -lz test.c Jul 02 11:34:28 zlib1g-dev installed, version 1:1.2.3.4.dsfg-3ubuntu4 Jul 02 11:35:00 I had installed almost all I found with "zlib" in synaptics... Jul 02 11:35:23 gcc -include zlib.h -x c -lz test.c /tmp/ccerXcUR.o: In function `main': test.c:(.text+0x1a): undefined reference to `gzdopen' collect2: ld devolvió el estado de salida 1 Jul 02 11:56:33 qq_: Could you run the following command and use pastebin.com to paste te result? objdump -T /usr/lib/x86_64-linux-gnu/libz.so Jul 02 12:00:09 http://pastebin.com/T8Bav08t Jul 02 12:02:16 gzdopen is in there, so somehow gcc fails to link to the right libz.so it seems Jul 02 12:04:06 But I can't seem to find how to tell gcc to print the .so files it's linking Jul 02 12:04:32 Can you try: gcc -v -lz test.c Jul 02 12:04:46 (and pastebin the result again) Jul 02 12:05:45 * blathijs is off to lunch, I'll be back in 30 mins or so Jul 02 12:14:53 http://pastebin.com/5Rw7hGHi Jul 02 12:37:24 qq_: and "locate libz.so" ? Jul 02 12:41:12 libz.so is in /usr/lib Jul 02 12:41:55 usr/lib/x86_64-linux-gnu Jul 02 12:42:25 and in /usr/lib32 Jul 02 12:50:28 Can you see if the ones in /usr/lib and /usr/lib/x86_64-linux-gnu perhaps are the same files (e.g., through symlinks)? Jul 02 12:52:11 Though if I read the gcc -v output right, /usr/lib/x86... should be searched before /usr/lib, so that shouldn't matter Jul 02 12:55:39 it's a link Jul 02 12:57:50 to x86_64-linux-gnu Jul 02 12:58:03 and there to libz.so.1.2.3.4 Jul 02 13:00:19 that is in /usr/lib/debug/lib/x86_64-linux-gnu Jul 02 13:11:49 I just installed the zlib1g package from Ubuntu (your version) and now it breaks for me too Jul 02 13:12:33 i'll try getting it out... Jul 02 13:13:00 Hmm, this is funny. The package seems to contain /lib/x86_64-linux-gnu/libz.so.1.2.3.4 Jul 02 13:13:08 so not /usr/lib/.. or /usr/lib/debug/.. Jul 02 13:14:24 what does dpkg -L zlib1g say on your system? Jul 02 13:14:44 it seems not trivial to get it out, almost one half of ubuntu depends on it... Jul 02 13:15:57 http://pastebin.com/SQe5aNN3 Jul 02 13:33:44 What are you trying to get out? Jul 02 13:35:16 Weirdly enough, the libz.so.1.2.3.4 file in /lib does seem to containt the gzdopen symbol, according to objdump -T Jul 02 13:38:19 Hmm, wth Jul 02 13:38:38 If I run "gcc test.c -lz" it works, but "gcc -lz test.c" doesn't? :-S Jul 02 13:39:41 perhaps installing libz from debian instead from ubuntu will work... Jul 02 13:40:01 still, it's weird that it's broken as it is Jul 02 13:40:18 But perhaps this is more of a Ubuntu bug than a Fonera bug Jul 02 13:40:32 (the problem described in the thread you linked does not seem to apply here, AFAICS) Jul 02 13:40:39 it seems... Jul 02 13:41:35 I'll try it tomorrow Jul 02 13:41:44 thanks a lot for your help Jul 02 13:58:39 You might want to file a bug at Ubuntu as well, I think Jul 02 13:58:46 And you're welcome :-) Jul 02 14:03:27 ok, I'll do , thanks again Jul 02 14:27:56 blathijs, another though in the same direction: one month ago, I installed and compilled succesfully the openwrt/trunk 10.3.1 and I suppose it depends on ncurses and zlib already, so I don't know where the error is: ubuntu? fon sdk? Jul 02 14:29:59 Hmm, looking more closely, it seems that openwrt trunk actually has the -lz after the file name (or - for stdout in this case): Jul 02 14:30:06 https://dev.openwrt.org/browser/trunk/include/prereq-build.mk#L85 Jul 02 14:33:15 qq_: Do you know how to apply a patch? Jul 02 14:35:20 not yet Jul 02 14:35:55 I'm having problems trying to get the .deb packages instead the ubuntu ones... Jul 02 14:40:01 qq_: Don't bother, I think we can fix this inside the Fonera source tree Jul 02 14:41:10 qq_: Here's a patch that should fix it: http://www.stderr.nl/static/tmp/prereq-fix.patch Jul 02 14:41:22 To apply it, download the file and then run the patch command Jul 02 14:41:48 e.g. "cat prereq-fix.patch | patch -p1" (from a shell which is in the root of your svn checkout) Jul 02 14:42:07 i'm on it, first I need to reinstall some packets... Jul 02 14:42:34 You probably need to revert your own changes to prereq-build.mk first (svn revert includes/prereq-build.mk should do that) Jul 02 15:02:41 I think is done but the error remains Jul 02 15:04:04 http://pastebin.com/v6UqtCvH Jul 02 15:07:08 Hmm, seems these are different errors Jul 02 15:07:26 but at least the error with finding out if zlib is supported is gone now Jul 02 15:09:41 Could you try running a "make clean" and then "make V=99" again, just to be sure? Jul 02 15:15:54 qq_: Ah, never mind. Seems to be a library order issue in there as well Jul 02 15:32:50 yes, prerequisites error has gone Jul 02 15:33:17 but it seem to remains the libz.so trouble Jul 02 15:33:21 http://pastebin.com/MbqbCgeA Jul 02 15:49:06 qq_: Here's another patch, which fixes that problem for me: http://www.stderr.nl/static/tmp/sqlzma-fix.patch Jul 02 16:05:03 all seems to be perfct now!! Jul 02 16:05:47 thanks a lot, using 2 PC's was been tedious... Jul 02 16:07:15 qq_: Cool, thanks for reporting and testing Jul 02 16:07:54 I'll commit these two patches now, so your svn might complain when updating after that (svn revert on the affected files should fix that) Jul 02 16:08:09 perfect!! Jul 02 16:08:16 thanks again Jul 02 16:08:25 committed :-) **** ENDING LOGGING AT Tue Jul 03 02:59:57 2012