irclog2html for #uclibc on 20030529

01:09.35*** join/#uclibc TheMasterMind1 (~aman@h-68-166-69-184.MCLNVA23.covad.net)
04:33.56*** join/#uclibc mutex (~mutex@h-68-164-243-10.SNVACAID.covad.net)
07:30.07mutexandersee: i don't understand the reason for the glibc include and start files patching
07:30.54mutexthe toolchain builder does this before it builds uclibc, so ... is it just for making sure glibc doesn't get in.. not that uclibc gets in
07:42.54anderseemutex: glibc?
07:43.17anderseemutex: Could you be a bit more specific?
07:43.31mutexwell
07:43.55mutexthere is a set of perl, search and replace lines in the uclibc_toolchain.mk file
07:44.00mutexin the buildroot tarball
07:44.14anderseemutex: yes
07:44.30mutexi don't understand why you use some of the ones you use
07:44.43mutexspecifically for gcc
07:44.46anderseemutex: ok.
07:44.50anderseemutex: Look here:
07:44.54anderseehttp://uclibc.org/cgi-bin/cvsweb/buildroot/make/uclibc_toolchain.mk?annotate=1.45
07:45.04anderseeAnd specify line numbers...
07:45.12mutexgood call
07:45.36mutex224-237
07:47.45anderseeIf you look in gcc-3.2.3/gcc/gcc.c for standard_startfile_prefix_1 and standard_startfile_prefix_2 you will see it attempts to hard code paths for its start files.
07:47.56mutexindeed i see this
07:49.48anderseeProblem is, for buildroot at least, we don't want to be looking at /lib and /usr/lib -- we want gcc to look under the buildroot staging area and nowhere else
07:50.06mutexbut at this point there is no headers in there
07:51.17mutexat the stage this gcc compile takes place, binutils has been compiled and nothing else...
07:51.18anderseeSure.  for a stage 1 compiler that is fine.  But we will be using the resulting compiler soon and we want it to behave itself.
07:51.30mutexaaahh, ok
07:51.34mutexhrm
07:52.23mutexthat's strange
07:52.25anderseethis particular hack has a much more important effect for the stage 2 compiler.  But I put it here since it doesn't hurt anything
07:52.37mutexi can see how it would cause trouble
07:52.48mutexbut my question is, why is that not a autoconf parameter
07:52.57mutexi suppose it is more rhetorical than anything
07:53.26anderseemutex: because the gcc folk didn't add it, and I have not attempted to supply them with a patch to do things properly
07:53.51mutexi see
07:53.55mutexunfortunate
07:54.14anderseemutex: In an ideal world, I would add a --with-uclibc type configure option that would automagically enable all the needed magic
07:54.21anderseeBut I have not done that
07:54.31mutexthat would be very nice
07:55.49anderseemutex: agreed it would be nice.  But I am afraid that will probably be a project for someone else.   I have thus far not had the interest/energy to make such a patch.
07:56.20mutexwell i wasn't implying you should do it, but an interesting thought
07:57.00mutexandersee: how many people actively hack uclibc ?
07:57.56anderseemutex: I've received patches from a number of people.  But primarily, there is just me and Manuel that have done the _vast_ majority of the work
08:00.39mutexand bug fixing i assume as well
08:01.15anderseeBut of course...  bug fixing constitutes the vast majority of the work.  ;-)
08:01.23mutexheh
16:13.34*** join/#uclibc randey (~randey@202.174.134.4)
18:20.15*** join/#uclibc andersee (~andersen@codepoet.org)
18:42.22mut3xis there any way that i can tell if I have properly built gcc for use with uclibc, rather than glibc ? other than attempting to compile something
18:45.59anderseemut3x: I used 'gcc -v' a lot to watch exactly what paths and such are being used...
18:46.29anderseemut3x: I probably rebuilt gcc at least a hundred times before I got things right
18:46.44mut3xheh, that's why i figured you'd be a good person to ask
18:46.59mut3xthough hopefully i don't become the annoying newbie
18:48.19anderseenah
18:48.42anderseeJust make liberal use of 'gcc -v' and watch what it is doing
19:04.33*** join/#uclibc randey (~randey@pptp3.speedcast.com)
20:16.07mut3xok, so...
20:16.27mut3xthe dynamic linker replacement script lines
20:17.05mut3xseem to keep gcc from compiling because: "./gengenrtl -h > tmp-genrtl.h" this line failes, since gengenrtl is never compiled
20:17.13mut3xany clue about what this executable does ?
20:24.33anderseeHmmm
20:24.47anderseeWhich gcc target is it run from.
20:25.12mut3xtarget as in ... '--target' or what version of gcc ?
20:25.21anderseeIt appears it is built and executed.  Perhaps being built using the target C lib...
20:25.44mut3xno it isn't being built and executed
20:25.47mut3x/bin/sh: line 1: ./gengenrtl: No such file or directory
20:25.52mut3xis the actual error line
20:26.27mut3xand i was hoping to avoid building using the target C lib, since this is a stage1 compiler at this point
20:26.57andersee[andersen@dillweed toolchain_build_i386]$ find -name gengenrtl
20:26.57andersee./gcc-initial/gcc/gengenrtl
20:26.57andersee./gcc-final/gcc/gengenrtl
20:26.57andersee[andersen@dillweed toolchain_build_i386]$ ldd ./gcc-initial/gcc/gengenrtl
20:26.57andersee<PROTECTED>
20:26.58andersee<PROTECTED>
20:27.39anderseeLooks like it is a binary intended for the build system, not the target.  I betcha you compiled it for the target.  Or tried to...
20:27.56mut3xwelll
20:27.57mut3xhrm
20:28.12mut3xthe thing that does it is the -dynamic-loader replacement line, i've narrowed it down to that
20:28.15mut3xwhich i find odd
20:29.58anderseeBut the -dynamic-loader replacement line should have _ZERO_ effect on a host binary.  Which is why I think you are using the wrong CC to build /gcc-3.2.3/gcc/gengenrtl.c
20:30.46mut3xCC = cross compiler ?
20:30.48anderseeIf you look at the generated Makefile...
20:30.55anderseeCC = C compiler
20:30.58mut3xah ok
20:30.59anderseegengenrtl$(build_exeext) : gengenrtl.o $(HOST_LIBDEPS)
20:30.59andersee<PROTECTED>
20:30.59andersee<PROTECTED>
20:30.59anderseegengenrtl.o : gengenrtl.c $(RTL_BASE_H) $(HCONFIG_H) $(SYSTEM_H) real.h
20:31.00andersee<PROTECTED>
20:31.18anderseeIt is clearly using the HOST_CC...  Not for the target.
20:31.28mut3xhmm well i only have one CC on my machine
20:31.42mut3x3.2.2
20:32.29anderseeIf the -dynamic-loader replacement line is causing this grief, the host binary building stuff is infected with stuff for the target.
20:33.17mut3xah, the stuff i was discussing with you last night
20:33.36mut3xthe target lib #defines
20:35.58mut3xah i missed a section of your include header rewriting
20:37.16mut3xhrm...
20:37.42mut3xok, but if i'm rewriting these things to NOT include glibc headers, and i point them to my new 'staging directory' and there _are_ no libc headers of any kind
20:37.50mut3xwill it still compile
21:06.40anderseemut3x: I think you are missing something.
21:07.14mut3xhmm missing as forgetting ? or missing as in I am not 'getting it' ;-) ?
21:08.09anderseemut3x: The HOST, or build, system is generally running glibc.  During the gcc build process, some binaries are compiled to be run on the HOST system.
21:08.55mut3xhmmm that is how things are supposed to work then ?
21:09.22anderseemut3x: The gcc build process cannot and should not try to compile _everything_ for the TARGET system (i.e. compile everything vs uClibc).
21:09.38mut3xhmm ok
21:10.04anderseemut3x: so lets step back a little bit.
21:10.12mut3xok, lets
21:10.15anderseemut3x: What exactly are you trying to produce?
21:10.33mut3xwell
21:10.45*** join/#uclibc zwelch (~kumquat@fluffy.superlucidity.net)
21:10.54mut3xgcc stage 1, at a point where i can compile uclibc
21:11.01anderseeok
21:11.04mut3xto (eventually) produce a uclibc toolchain
21:11.40anderseeAnd for a stage 1 compiler, gcc will be linked vs the host system's C library (typically glibc)
21:11.48mut3xalright
21:11.56anderseeok
21:12.38anderseemut3x: And you are working from the make/uclibc_toolchain.mk example in buildroot?
21:12.49*** join/#uclibc TheMasterMind1 (~aman@h-68-166-68-149.MCLNVA23.covad.net)
21:12.53mut3xexactly what i'm refrencing
21:13.01mut3x*that is exactly
21:13.11zwelchandersee: http://wiki.dev.gentoo.org/gentoo/moin.cgi/GentooEmbedded_2fMewClibc
21:13.24zwelchhave you been pointed at this yet?
21:13.29anderseeTried this http://uclibc.org/cgi-bin/cvsweb/toolchain/
21:13.34andersee?
21:14.02anderseeIf you just want a toolchain that is a more direct example.
21:14.02mut3xwhat do you mean 'tried' ?
21:14.09mut3xah
21:14.10mut3xok
21:14.14mut3xi didn't see the difference
21:14.37anderseeSame basic idea.  But produces just a toolchain, nothing else
21:14.43anderseezwelch: looking
21:14.45mut3xthat may be better for me
21:14.46zwelchmut3x: i was able to adapt the patches for uClibc into my ebuilds from that Makefile
21:15.04zwelchmut3x: i thought that's what you were working off of :/
21:15.19mut3xzwelch: erp ? i'm confused.. what are you talking about
21:16.28zwelchmut3x: the Makefile found under that cvsweb URL has all the patches you need to build a uClibc toolchain
21:16.38mut3xah
21:16.41mut3xwell then ;-)
21:16.41zwelchand they are "fairly easily" adapted to the ebuilds
21:17.01zwelchmut3x: sorry, as i said, i thought that's what you were working off of
21:17.14mut3xno, i was working off the buildroot toolchain makefile
21:18.14mut3xthis looks very similar to what i was using
21:18.46mut3xand i don't see much difference... although i shall continue ;-)
21:20.05mut3xalthough ihave to admit, i did not apply these patches
21:22.11zwelchandersee: i just made a few minor updates to that page that should make it a little nicer to look at and navigate between the rest of the site.  In essense, the uClibc page represents one small part of the overall Gentoo Embedded project I am currently leading.
21:23.57zwelchin the not too distant future, I plan to extend our current support for "one-step" cross-compiler to support different binutils, libc, and cc components; in effect, allowing the user to produce uClibc-based cross-compiling toolchian that installs in parallel with existing glibc-based toolchains
21:25.00anderseezwelch: i.e. sortof like the toolchains I make available on uClibc.org.  ;-)
21:25.14mut3xandersee: yeah, but package management included ;-)
21:25.21andersee:)
21:25.26zwelchandersee: right :)
21:26.36zwelchandersee: truly the "only" advatage will we have is the ability to then transparently use these cross-compilers with the package manager
21:28.50anderseeSounds pretty cool
21:30.16anderseeOne of the reasons I made my toolchains and buildroot system (other than the fact that nobody else was doing it) was so I could use it to bootstrap a debian base system using uClibc
21:30.50anderseeI still havn't finished doing that....  I got distracted a few months ago, and havn't gotten back to it.
21:32.31mut3xwell the other cool thing
21:32.47mut3xis then you can use emerge to produce a set of packages to put in the system
21:33.01mut3xand you get the flexibility of emerge as a build enviornment
21:33.14zwelchandersee: that's essentially what the package management integration will give us
21:33.49anderseeEssentially the same goal as I had
21:33.55zwelchCBUILD=i686-pc-linux-gnu CHOST=armv4l-unknown-linux-gnu ROOT=/some/place/safe  emerge system
21:34.06zwelchand it'll build your arm system in that safe place
21:34.19anderseezwelch: How do you handle cross-configuration?
21:34.29zwelchandersee: ummm...  carefully
21:34.33mut3xheh heh
21:34.34zwelchwe're still solving the details
21:34.38mut3x'carefully'
21:34.44anderseezwelch: i.e. when ./configure for openssh tries to run arm tests on the host x86 build system?
21:34.48mut3xit 'carefully' unmerged my entire system a couple weeks ago ;-)
21:34.52zwelchbut we do have a master plan written on the back of a napkin somewhere
21:35.06zwelchandersee: we have a solution ;)
21:35.26zwelchmut3x: yah, well, i won't try to claim we have it all today
21:35.47mut3xzwelch: i know, i'
21:35.53zwelchandersee: a key reason i'm going for cross-compilers is for distcc support
21:35.54mut3xi'm just giving you a hard time
21:36.16zwelchandersee: this way, a slow pathetic host can run the configure jobs and then farm them out over distcc
21:36.29zwelchs/them/the real compiling/
21:36.46zwelchand *that* does work great today :)
21:37.35anderseehehe
21:38.44mut3xzwelch: finally got that line fixed
21:39.30mut3xyay for me
21:42.46mut3xzwelch: erik and i had a discussion last night where he explained that unfortunately it looks like these evil little hacks are necessary until gcc has a --with-uclibc in configure
21:58.34zwelchexcellent, i am glad to hear that gcc will be made more "open" to other libcs
22:01.11mut3xwell 'open' as long as somebody produces this patch ;-)
22:01.22mut3xto provide the functionality mentioned
22:01.39mut3xhrm
23:10.54mut3xandersee: well my previous problem with gengentrl was due to a typo..
23:12.49anderseemut3x: oh?
23:12.58anderseeWrong CC?
23:13.11mut3xsed -e 's/-dynamic-linker.*\.so[\.0-9]*/-dynamic-linker \/lib\/ld-uClibc.s\o.0/g' -i $file
23:13.19mut3xshould be: sed -e 's/-dynamic-linker.*\.so[\.0-9]*}/-dynamic-linker \/lib\/ld-uClibc.s\o.0}/g' -i $file
23:17.09mut3xsilly, but seems to be the cause
23:17.51anderseelittle bitty typos like that can cause big 'ol problems
23:18.01mut3xack!
23:18.12mut3xblew up again
23:18.42anderseepaste in the error?
23:18.58mut3xstage1/xgcc -Bstage1/ -B/usr/i686-pc-linux-gnu/bin/ -DIN_GCC    -pipe -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long  -DHAVE_CONFIG_H -DGENERATOR_FILE  -o genpreds \
23:18.58mut3x<PROTECTED>
23:18.58mut3x./gengenrtl -h > tmp-genrtl.h
23:18.58mut3x/bin/sh: line 1: ./gengenrtl: No such file or directory
23:18.59mut3xmake[2]: *** [s-genrtl] Error 127
23:19.01mut3xmake[2]: *** Waiting for unfinished jobs....
23:19.03mut3xmake[2]: Leaving directory `/var/tmp/portage/gcc-3.2.2-r7/work/build/gcc'
23:19.05mut3xmake[1]: *** [stage2_build] Error 2
23:19.07mut3xmake[1]: Leaving directory `/var/tmp/portage/gcc-3.2.2-r7/work/build/gcc'
23:19.09mut3xmake: *** [bootstrap-lean] Error 2
23:20.44anderseemut3x: do a 'readelf -a gengenrtl | grep NEEDED'
23:21.20anderseeObviously inserting the proper gengenrtl path
23:21.24mut3xheh
23:21.35mut3xnot obvious for me :-(
23:22.06mut3xbut the executable isn't created
23:22.25anderseeare you _sure_
23:23.08mut3xok, i shall go dig for it
23:23.36mut3xhmmm
23:23.37anderseei.e. the same think I suggested was wrong, oh, several hours ago
23:23.40mut3xwell, your right as usual
23:23.46mut3x<PROTECTED>
23:24.03anderseeTry looking for INTERP now
23:24.24mut3x<PROTECTED>
23:24.32mut3xthat look familiar
23:24.39anderseeAdd a -A1 to the grep.  :)
23:25.36anderseei.e. 'readelf -a gengenrtl | grep -A1 INTERP'
23:25.40mut3xright
23:25.45mut3xbrb, gotta run an errand :-/
23:25.58anderseelater
23:30.22mut3x<PROTECTED>
23:30.22mut3x<PROTECTED>
23:30.48mut3xso it is against ld-uClibc.so.0
23:30.59mut3xand it needs to be linked against the system libc, iirc
23:31.44anderseeSomehow, the shared lib loader hack is inadvertantly causing these binaries to use the uClibc shared lib loader.
23:32.07anderseeThe funny thing is, if you copied ld-uClibc.so.0 into /lib it would probably work.
23:32.14mut3xright
23:32.27anderseeAnd may very well be why I havn't seen that before.
23:32.40mut3xinteresting
23:32.40anderseeI assume you were copying my hack exactly?
23:32.45mut3xyup
23:32.50mut3xwell
23:32.55mut3xtranslated to sed ;-)
23:32.57mut3xbut the same
23:33.18anderseemut3x: you get a gold star for finding a bug in my code.  :-)
23:33.26mut3xwoohoo
23:33.37mut3xwell I could easily exempt the file
23:36.06mut3xi guess we will find out if there are other instances of this ...
23:46.39mut3xhmm
23:49.07mut3xthis version doesn't want to be linked against uClibcl.so.0 though, or.. doesn't need to be
23:49.18mut3xit just needs to produce uClibc.so.0, correct ?
23:49.33mut3xthen the subsequent compilation(full gcc) should be linked against uclibc
23:54.17anderseeThe gengenrtl app is a host app.  It does not need or want uClibc
23:54.50mut3xclearly
23:55.03mut3xbut in the stage1 compile, does _anything_ need uClibc
23:55.24anderseenope
23:55.32mut3xi see
23:55.36mut3xwell then
23:55.41mut3xthat makes my job easier

Generated by irclog2html.pl by Jeff Waugh - find it at freshmeat.net! Modified by Tim Riker to work with blootbot logs, split per channel, etc.