Date: Fri, 08 Feb 2002 17:51:26 +0200 From: Maxim Sobolev <sobomax@FreeBSD.org> To: Ruslan Ermilov <ru@FreeBSD.org> Cc: Terry Lambert <tlambert2@mindspring.com>, Jason Evans <jasone@canonware.com>, jdp@FreeBSD.org, deischen@FreeBSD.org, jasone@FreeBSD.org, hackers@FreeBSD.org, jlemon@FreeBSD.org Subject: Re: Linking libc before libc_r into application causes weird problems Message-ID: <3C63F3FE.D4E73334@FreeBSD.org> References: <1013147180.73417.2.camel@notebook> <20020207234233.D23162@canonware.com> <3C639A8C.6D100326@FreeBSD.org> <3C63A62D.3E4A4FC4@mindspring.com> <3C63AD02.79BA5AF5@FreeBSD.org> <20020208164132.D78163@sunbay.com> <3C63E5D1.1E423698@FreeBSD.org> <3C63E961.45706408@mindspring.com> <20020208172503.H78163@sunbay.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------1016F4DCC774CCCF248737AF Content-Type: text/plain; charset=x-user-defined Content-Transfer-Encoding: 7bit Ruslan Ermilov wrote: > > On Fri, Feb 08, 2002 at 07:06:09AM -0800, Terry Lambert wrote: > > Maxim Sobolev wrote: > > > No, I meant ld(1). The problem here is that in the case when libc is > > > recorded before libc_r in dynamic dependencies list the resulting > > > executable may not work correctly (see my testcase). > > > > Patient: "Doctor, it hurts when I record libc before libc_r > > in the dynamic dependencies list!" > > > > Doctor: [expected response] > > > > 8-). > > > > Seriously, the "Evolution" build process is seriously > > broken; it works on Linux because Linux has a simple > > threads implementation, rather than an efficient one. > > > Doctor's Assistant: "No library should ever have an explicit > dependency on libc". But no library has it here! libc comes out of blue just before libc_r - see attached script. Perhaps I'm missing something, but I can't figure out where it comes from, could you? -Maxim --------------1016F4DCC774CCCF248737AF Content-Type: text/plain; charset=x-user-defined; name="log" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="log" Script started on Fri Feb 8 17:41:11 2002 root@notebook# gmake Making all in glade gmake[1]: =F7=C8=CF=C4 =D7 =CB=C1=D4=C1=CC=CF=C7 `/tmp/portbuild/usr/port= s/mail/evolution/work/evolution-1.0.2/shell/glade' gmake[1]: =E3=C5=CC=D8 `all' =CE=C5 =D4=D2=C5=C2=D5=C5=D4 =D7=D9=D0=CF=CC= =CE=C5=CE=C9=D1 =CB=CF=CD=C1=CE=C4. gmake[1]: =F7=D9=C8=CF=C4 =C9=DA =CB=C1=D4=C1=CC=CF=C7 `/tmp/portbuild/us= r/ports/mail/evolution/work/evolution-1.0.2/shell/glade' Making all in importer gmake[1]: =F7=C8=CF=C4 =D7 =CB=C1=D4=C1=CC=CF=C7 `/tmp/portbuild/usr/port= s/mail/evolution/work/evolution-1.0.2/shell/importer' gmake[1]: =E3=C5=CC=D8 `all' =CE=C5 =D4=D2=C5=C2=D5=C5=D4 =D7=D9=D0=CF=CC= =CE=C5=CE=C9=D1 =CB=CF=CD=C1=CE=C4. gmake[1]: =F7=D9=C8=CF=C4 =C9=DA =CB=C1=D4=C1=CC=CF=C7 `/tmp/portbuild/us= r/ports/mail/evolution/work/evolution-1.0.2/shell/importer' gmake[1]: =F7=C8=CF=C4 =D7 =CB=C1=D4=C1=CC=CF=C7 `/tmp/portbuild/usr/port= s/mail/evolution/work/evolution-1.0.2/shell' /bin/sh ../libtool --mode=3Dlink cc -pipe -O -mpreferred-stack-boundary=3D= 2 -march=3Dpentium -I/usr/X11R6/include -Wall -Wunused -L/usr/X11R6/lib = -o evolution e-activity-handler.o e-component-registry.o e-corba-shortcu= ts.o e-corba-storage-registry.o e-corba-storage.o e-folder-type-registry.= o e-folder.o e-gray-bar.o e-local-folder.o e-local-storage.o e-setup.o e-= shell-about-box.o e-shell-folder-commands.o e-shell-folder-creation-dialo= g.o e-shell-folder-selection-dialog.o e-shell-folder-title-bar.o e-shell-= importer.o e-shell-offline-handler.o e-shell-startup-wizard.o e-shell-use= r-creatable-items-handler.o e-shell-utils.o e-shell-view-menu.o e-shell-v= iew.o e-shell.o e-shortcuts-view-model.o e-shortcuts-view.o e-shortcuts.o= e-splash.o e-storage-set-view.o e-storage-set.o e-storage.o e-summary-st= orage.o e-task-bar.o e-task-widget.o e-uri-schema-registry.o evolution-st= orage-set-view.o evolution-storage-set-view-factory.o main.o libeshell.la= importer/libevolution-importer.la ../widgets/e-timezone-dialog/= libetimezonedialog.a ../widgets/misc/libemiscwidgets.a ../e-util/libeu= til.la ../libical/src/libical/libical-evolution.la -Wl,-E -L/usr/X11R= 6/lib -L/usr/local/lib -lgal -lgnomeprint -lfreetype -lglade-gnome -lglad= e -lxml -lXpm -ljpeg -lgnomeui -lart_lgpl -lgdk_imlib -ltiff -lungif -lpn= g -lz -lSM -lICE -lgnome -lgnomesupport -lesd -laudiofile -lgdk_pixbuf -l= gtk12 -lgdk12 -lgmodule12 -lglib12 -lintl -lXext -lX11 -lm -lgnomecanvasp= ixbuf -lgiconv -lc_r -L/usr/local/lib -lgthread12 -lglib12 -lc_r -Wl= ,-E -L/usr/X11R6/lib -L/usr/local/lib -lgnomeprint -lXpm -ljpeg -lgnomeui= -lgdk_imlib -ltiff -lungif -lpng -lSM -lICE -lgnome -lgnomesupport -lesd= -laudiofile -lgdk_pixbuf -lgtk12 -lgdk12 -lgmodule12 -lglib12 -lintl -lX= ext -lX11 -lart_lgpl -lm -lxml -lz -lfreetype -Wl,-E -L/usr/X11R6/li= b -L/usr/local/lib -lgtkhtml -lgal -lgnomeprint -lfreetype -lglade-gnome = -lglade -lxml -lXpm -ljpeg -lgnomeui -lart_lgpl -lgdk_imlib -ltiff -lungi= f -lpng -lz -lSM -lICE -lgnome -lgnomesupport -lesd -laudiofile -lgdk_pix= buf -lgnomecanvaspixbuf -lgiconv -lgconf-gtk-1 -lgconf-1 -loaf -lORBitCos= Naming -lORBit -lIIOP -lORBitutil -lwrap -lgtk12 -lgdk12 -lgmodule12 -lgl= ib12 -lintl -lXext -lX11 -lm -Wl,-E -L/usr/X11R6/lib -L/usr/local/l= ib -lbonobo_conf -lbonobo -loaf -lORBitCosNaming -lORBit -lIIOP -lORBitut= il -lwrap -lbonobox -lXpm -ljpeg -lgnomeui -lart_lgpl -lgdk_imlib -ltiff = -lungif -lpng -lSM -lICE -lgdk_pixbuf -lgtk12 -lgdk12 -lgmodule12 -lXext = -lX11 -lxml -lz -lgnome -lgnomesupport -lintl -lesd -laudiofile -lm -lgli= b12 -Wl,-E -L/usr/X11R6/lib -L/usr/local/lib -lbonobo -loaf -lORBitC= osNaming -lORBit -lIIOP -lORBitutil -lwrap -lbonobox -lbonobo-print -lgno= meprint -lfreetype -lglade-gnome -lglade -lxml -lgdk_pixbuf -lgnomecanvas= pixbuf -lXpm -ljpeg -lgnomeui -lart_lgpl -lgdk_imlib -ltiff -lungif -lpng= -lz -lSM -lICE -lgtk12 -lgdk12 -lgmodule12 -lXext -lX11 -lgnome -lgnomes= upport -lintl -lesd -laudiofile -lm -lglib12 -lc_r -L/usr/local/lib cc -pipe -O -mpreferred-stack-boundary=3D2 -march=3Dpentium -I/usr/X11R6/= include -Wall -Wunused -o .libs/evolution e-activity-handler.o e-componen= t-registry.o e-corba-shortcuts.o e-corba-storage-registry.o e-corba-stora= ge.o e-folder-type-registry.o e-folder.o e-gray-bar.o e-local-folder.o e-= local-storage.o e-setup.o e-shell-about-box.o e-shell-folder-commands.o e= -shell-folder-creation-dialog.o e-shell-folder-selection-dialog.o e-shell= -folder-title-bar.o e-shell-importer.o e-shell-offline-handler.o e-shell-= startup-wizard.o e-shell-user-creatable-items-handler.o e-shell-utils.o e= -shell-view-menu.o e-shell-view.o e-shell.o e-shortcuts-view-model.o e-sh= ortcuts-view.o e-shortcuts.o e-splash.o e-storage-set-view.o e-storage-se= t.o e-storage.o e-summary-storage.o e-task-bar.o e-task-widget.o e-uri-sc= hema-registry.o evolution-storage-set-view.o evolution-storage-set-view-f= actory.o main.o -Wl,-E -Wl,-E -Wl,-E -Wl,-E -Wl,-E -L/usr/X11R6/lib ./.l= ibs/libeshell.so -L/usr/local/lib importer/.libs/libevolution-importer.so= ../widgets/e-timezone-dialog/libetimezonedialog.a ../widgets/misc/libemi= scwidgets.a ../e-util/.libs/libeutil.al ../libical/src/libical/.libs/libi= cal-evolution.so -lgthread12 -lgtkhtml -lgal -lgiconv -lgconf-gtk-1 -lgco= nf-1 -lbonobo_conf -lbonobo -loaf -lORBitCosNaming -lORBit -lIIOP -lORBit= util -lwrap -lbonobox -lbonobo-print -lgnomeprint -lfreetype -lglade-gnom= e -lglade -lxml -lgdk_pixbuf -lgnomecanvaspixbuf -lXpm -ljpeg -lgnomeui -= lart_lgpl -lgdk_imlib -ltiff -lungif -lpng -lz -lSM -lICE -lgtk12 -lgdk12= -lgmodule12 -lXext -lX11 -lgnome -lgnomesupport -lintl -lesd -laudiofile= -lm -lglib12 -Wl,--rpath -Wl,/usr/X11R6/lib importer/.libs/libevolution-importer.so: warning: mktemp() possibly used = unsafely; consider using mkstemp() creating evolution gmake[1]: =F7=D9=C8=CF=C4 =C9=DA =CB=C1=D4=C1=CC=CF=C7 `/tmp/portbuild/us= r/ports/mail/evolution/work/evolution-1.0.2/shell' root@notebook# ldd .libs/evolution =2Elibs/evolution: libeshell.so.0 =3D> /usr/X11R6/lib/libeshell.so.0 (0x280ab000) libevolution-importer.so.0 =3D> /usr/X11R6/lib/libevolution-importer.so.= 0 (0x280e0000) libical-evolution.so.0 =3D> /usr/X11R6/lib/libical-evolution.so.0 (0x280= fd000) libgthread12.so.3 =3D> /usr/local/lib/libgthread12.so.3 (0x2814e000) libgtkhtml.so.21 =3D> /usr/X11R6/lib/libgtkhtml.so.21 (0x28151000) libgal.so.19 =3D> /usr/X11R6/lib/libgal.so.19 (0x281c5000) libgiconv.so.2 =3D> /usr/local/lib/libgiconv.so.2 (0x282ab000) libgconf-gtk-1.so.1 =3D> /usr/X11R6/lib/libgconf-gtk-1.so.1 (0x28380000)= libgconf-1.so.1 =3D> /usr/X11R6/lib/libgconf-1.so.1 (0x28386000) libbonobo_conf.so.0 =3D> /usr/X11R6/lib/libbonobo_conf.so.0 (0x283bd000)= libbonobo.so.2 =3D> /usr/X11R6/lib/libbonobo.so.2 (0x283df000) liboaf.so.0 =3D> /usr/X11R6/lib/liboaf.so.0 (0x2843b000) libORBitCosNaming.so.2 =3D> /usr/local/lib/libORBitCosNaming.so.2 (0x284= 53000) libORBit.so.2 =3D> /usr/local/lib/libORBit.so.2 (0x2845b000) libIIOP.so.2 =3D> /usr/local/lib/libIIOP.so.2 (0x284a3000) libORBitutil.so.2 =3D> /usr/local/lib/libORBitutil.so.2 (0x284ab000) libwrap.so.3 =3D> /usr/lib/libwrap.so.3 (0x284ad000) libbonobox.so.2 =3D> /usr/X11R6/lib/libbonobox.so.2 (0x284b4000) libbonobo-print.so.2 =3D> /usr/X11R6/lib/libbonobo-print.so.2 (0x2850900= 0) libgnomeprint.so.16 =3D> /usr/X11R6/lib/libgnomeprint.so.16 (0x2850d000)= libfreetype.so.8 =3D> /usr/X11R6/lib/libfreetype.so.8 (0x28966000) libglade-gnome.so.4 =3D> /usr/X11R6/lib/libglade-gnome.so.4 (0x2899f000)= libglade.so.4 =3D> /usr/X11R6/lib/libglade.so.4 (0x289ad000) libxml.so.5 =3D> /usr/local/lib/libxml.so.5 (0x289c3000) libgdk_pixbuf.so.2 =3D> /usr/X11R6/lib/libgdk_pixbuf.so.2 (0x28a31000) libgnomecanvaspixbuf.so.1 =3D> /usr/X11R6/lib/libgnomecanvaspixbuf.so.1 = (0x28a45000) libXpm.so.4 =3D> /usr/X11R6/lib/libXpm.so.4 (0x28a49000) libjpeg.so.9 =3D> /usr/local/lib/libjpeg.so.9 (0x28a56000) libgnomeui.so.5 =3D> /usr/X11R6/lib/libgnomeui.so.5 (0x28a73000) libart_lgpl.so.5 =3D> /usr/X11R6/lib/libart_lgpl.so.5 (0x28b39000) libgdk_imlib.so.5 =3D> /usr/X11R6/lib/libgdk_imlib.so.5 (0x28b46000) libtiff.so.4 =3D> /usr/local/lib/libtiff.so.4 (0x28b6f000) libungif.so.5 =3D> /usr/local/lib/libungif.so.5 (0x28bb2000) libpng.so.5 =3D> /usr/local/lib/libpng.so.5 (0x28bba000) libz.so.2 =3D> /usr/lib/libz.so.2 (0x28bdb000) libSM.so.6 =3D> /usr/X11R6/lib/libSM.so.6 (0x28be8000) libICE.so.6 =3D> /usr/X11R6/lib/libICE.so.6 (0x28bf1000) libgtk12.so.2 =3D> /usr/X11R6/lib/libgtk12.so.2 (0x28c06000) libgdk12.so.2 =3D> /usr/X11R6/lib/libgdk12.so.2 (0x28d24000) libgmodule12.so.3 =3D> /usr/local/lib/libgmodule12.so.3 (0x28d55000) libXext.so.6 =3D> /usr/X11R6/lib/libXext.so.6 (0x28d58000) libX11.so.6 =3D> /usr/X11R6/lib/libX11.so.6 (0x28d65000) libgnome.so.5 =3D> /usr/X11R6/lib/libgnome.so.5 (0x28e1e000) libgnomesupport.so.5 =3D> /usr/X11R6/lib/libgnomesupport.so.5 (0x28e3400= 0) libintl.so.1 =3D> /usr/local/lib/libintl.so.1 (0x28e3b000) libesd.so.2 =3D> /usr/local/lib/libesd.so.2 (0x28e40000) libaudiofile.so.0 =3D> /usr/local/lib/libaudiofile.so.0 (0x28e47000) libm.so.2 =3D> /usr/lib/libm.so.2 (0x28e67000) libglib12.so.3 =3D> /usr/local/lib/libglib12.so.3 (0x28e8b000) libc.so.5 =3D> /usr/lib/libc.so.5 (0x28eac000) libc_r.so.5 =3D> /usr/lib/libc_r.so.5 (0x28f5d000) libpopt.so.0 =3D> /usr/local/lib/libpopt.so.0 (0x28f7b000) libXThrStub.so.6 =3D> /usr/X11R6/lib/libXThrStub.so.6 (0x28f81000) root@notebook# ldd .libs/evolution | awk '{print $3}' /usr/X11R6/lib/libeshell.so.0 /usr/X11R6/lib/libevolution-importer.so.0 /usr/X11R6/lib/libical-evolution.so.0 /usr/local/lib/libgthread12.so.3 /usr/X11R6/lib/libgtkhtml.so.21 /usr/X11R6/lib/libgal.so.19 /usr/local/lib/libgiconv.so.2 /usr/X11R6/lib/libgconf-gtk-1.so.1 /usr/X11R6/lib/libgconf-1.so.1 /usr/X11R6/lib/libbonobo_conf.so.0 /usr/X11R6/lib/libbonobo.so.2 /usr/X11R6/lib/liboaf.so.0 /usr/local/lib/libORBitCosNaming.so.2 /usr/local/lib/libORBit.so.2 /usr/local/lib/libIIOP.so.2 /usr/local/lib/libORBitutil.so.2 /usr/lib/libwrap.so.3 /usr/X11R6/lib/libbonobox.so.2 /usr/X11R6/lib/libbonobo-print.so.2 /usr/X11R6/lib/libgnomeprint.so.16 /usr/X11R6/lib/libfreetype.so.8 /usr/X11R6/lib/libglade-gnome.so.4 /usr/X11R6/lib/libglade.so.4 /usr/local/lib/libxml.so.5 /usr/X11R6/lib/libgdk_pixbuf.so.2 /usr/X11R6/lib/libgnomecanvaspixbuf.so.1 /usr/X11R6/lib/libXpm.so.4 /usr/local/lib/libjpeg.so.9 /usr/X11R6/lib/libgnomeui.so.5 /usr/X11R6/lib/libart_lgpl.so.5 /usr/X11R6/lib/libgdk_imlib.so.5 /usr/local/lib/libtiff.so.4 /usr/local/lib/libungif.so.5 /usr/local/lib/libpng.so.5 /usr/lib/libz.so.2 /usr/X11R6/lib/libSM.so.6 /usr/X11R6/lib/libICE.so.6 /usr/X11R6/lib/libgtk12.so.2 /usr/X11R6/lib/libgdk12.so.2 /usr/local/lib/libgmodule12.so.3 /usr/X11R6/lib/libXext.so.6 /usr/X11R6/lib/libX11.so.6 /usr/X11R6/lib/libgnome.so.5 /usr/X11R6/lib/libgnomesupport.so.5 /usr/local/lib/libintl.so.1 /usr/local/lib/libesd.so.2 /usr/local/lib/libaudiofile.so.0 /usr/lib/libm.so.2 /usr/local/lib/libglib12.so.3 /usr/lib/libc.so.5 /usr/lib/libc_r.so.5 /usr/local/lib/libpopt.so.0 /usr/X11R6/lib/libXThrStub.so.6 root@notebook# ldd .libs/evolution | awk '{print $3}' | grep -v /usr/lib/= libc.so | xargs ldd | grep libc.so root@notebook# exit Script done on Fri Feb 8 17:43:04 2002 --------------1016F4DCC774CCCF248737AF-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C63F3FE.D4E73334>