I wanted to compile pnetlib (after emerging treecc + pnet) 0.5.8 on a server-like system, which does not have X11 or any GUI installed. Since the last message included a "-lX11" in its gcc-call and from looking at the ebuild I think that the current version of the ebuild does not feature a check for X11 presence and not even has X11 set in IUSE. Reproducible: Always Steps to Reproduce: 1. emerge pnetlib (the 0.5.8 one, including treecc 0.58 and pnet 0.58) Actual Results: [...] "/usr/bin/csant" --compiler cscc -Dcscc="/usr/bin/cscc" -Dcscc.plugins.cs="/usr/lib/cscc/plugins/cscc-cs" --profile "../profiles/full" -f Xsharp.build all Building project `pnetlib Xsharp' Building target `all' for project `pnetlib Xsharp' /usr/bin/cscc -fplugin-cs-path=/usr/lib/cscc/plugins/cscc-cs -o ./Xsharp.dll -g -funsafe -O2 -Wno-empty-input -DNON_ECMA -DCONFIG_REFLECTION -DCONFIG_RUNTIME_INFRA -DCONFIG_EXTENDED_NUMERICS -DCONFIG_DEBUG_LINES -DCONFIG_REMOTING -DCONFIG_SERIALIZATION -DCONFIG_REFLECTION_EMIT -DCONFIG_COM_INTEROP -DCONFIG_CODEDOM -DCONFIG_CRYPTO -DCONFIG_X509_CERTIFICATES -DCONFIG_PERMISSIONS -DCONFIG_POLICY_OBJECTS -DCONFIG_EXTENDED_DIAGNOSTICS -DCONFIG_WIN32_SPECIFICS -DCONFIG_ISOLATED_STORAGE -DCONFIG_COMPONENT_MODEL -DCONFIG_COMPONENT_MODEL_DESIGN -DCONFIG_SSL -DDEBUG -DTRACE -fresources=./../resources/en_US/Xsharp/Xsharp.resources ./S.cs ./StandardColor.cs [...] ./Events/XClientMessageEvent.cs ./Events/XCreateWindowEvent.cs ./Events/EventMask.cs ./Events/XConfigureRequestEvent.cs ./Xlib.cs -L./../runtime -lmscorlib mkdir .libs gcc -DPACKAGE=\"pnetlib\" -DVERSION=\"0.5.8\" -DX_DISPLAY_MISSING=1 -DSTDC_HEADERS=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_TIME_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_SELECT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SELECT=1 -DSIZEOF_INT=4 -DSIZEOF_LONG=4 -I. -I. -march=pentium -O3 -pipe -fomit-frame-pointer -Wp,-MD,.deps/XsharpSupport.pp -c XsharpSupport.c -fPIC -DPIC -o .libs/XsharpSupport.lo gcc -DPACKAGE=\"pnetlib\" -DVERSION=\"0.5.8\" -DX_DISPLAY_MISSING=1 -DSTDC_HEADERS=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_TIME_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_SELECT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SELECT=1 -DSIZEOF_INT=4 -DSIZEOF_LONG=4 -I. -I. -march=pentium -O3 -pipe -fomit-frame-pointer -Wp,-MD,.deps/XsharpSupport.pp -c XsharpSupport.c -o XsharpSupport.o >/dev/null 2>&1 mv -f .libs/XsharpSupport.lo XsharpSupport.lo /bin/sh ../libtool --mode=link gcc -march=pentium -O3 -pipe -fomit-frame-pointer -o libXsharpSupport.la -rpath /usr/lib/cscc/lib -lX11 XsharpSupport.lo rm -fr .libs/libXsharpSupport.la .libs/libXsharpSupport.* .libs/libXsharpSupport.* gcc -shared XsharpSupport.lo -lX11 -lc -Wl,-soname -Wl,libXsharpSupport.so.0 -o .libs/libXsharpSupport.so.0.0.0 /usr/lib/gcc-lib/i586-pc-linux-gnu/3.2.2/../../../../i586-pc-linux-gnu/bin/ld: cannot find -lX11 collect2: ld returned 1 exit status make[1]: *** [libXsharpSupport.la] Error 1 make[1]: *** Waiting for unfinished jobs.... Leaving target `all' for project `pnetlib Xsharp' Ending project `pnetlib Xsharp' make[1]: Leaving directory `/var/tmp/portage/pnetlib-0.5.8/work/pnetlib-0.5.8/Xsharp' make: *** [all-recursive] Error 1 !!! ERROR: dev-libs/pnetlib-0.5.8 failed. !!! Function src_compile, Line 19, Exitcode 2 !!! (no error message) Expected Results: emerge exits without an error Portage 2.0.48 (default-x86-1.4, gcc-3.2.2, glibc-2.3.1-r2) ================================================================= System uname: 2.4.20-openmosix-r3 i586 Pentium 75 - 200 GENTOO_MIRRORS="http://gentoo.linux.no" CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" PORTDIR="/usr/portage" DISTDIR="/usr/portage/distfiles" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR_OVERLAY="/usr/local/portage" USE="x86 3dnow apm arts avi cups encode imlib mikmod mmx motif ncurses nls oggvorbis quicktime sdl svga xmms xv zlib gdbm berkdb slang readline pam libwww perl python xml2 ssl samba -mysql libg++ gpm -crypt -pdflib -java -X -opengl -qt -freetype -aspell -kde -gtk -gnome -alsa -oss -spell -truetype -tcpd -mpeg -freetype -opengl -tiff php gd gif png jpeg" COMPILER="gcc3" CHOST="i586-pc-linux-gnu" CFLAGS="-march=pentium -O3 -pipe -fomit-frame-pointer" CXXFLAGS="-march=pentium -O3 -pipe -fomit-frame-pointer" ACCEPT_KEYWORDS="x86" MAKEOPTS="-j5" AUTOCLEAN="yes" SYNC="rsync://rsync.gentoo.org/gentoo-portage" FEATURES="sandbox distcc ccache"
I will look into this
you have a group to look into it, use it.
I guess there already is a solution for this. ./configure --without-x should do the trick if we don't have X11 headers, but it doesn't work because Xsharp/Makefile.am includes -lX11 anyway...(bug in 0.5.8 release, will be fixed in dotgnu-pnet cvs shortly). I'll add a check for X in the ebuild and include that patch as soon as it made it's way through.
Created attachment 14111 [details] pnet-0.5.8 X11 check Could you please test this ebuild + the two patches ? I am not sure wether they work for systems without X or not, so I need your input. I also added X to use and added virtual/x11 to the deps if X is in USE (which automatically enables Xsharp support etc. and works, but I don't know wether the patches solve the problem on systems without X11)
hm, you can try it but I think there is something wrong with my patches, I just don't know what. From what I can see the two files my patches are for are the only one which changed, but when I apply it to the release tarball and use --without-x in configure it doesn't build, but when I use today's cvs snapshot and use --without-x it does build...Seems like I really missed something... Gimme some time to find out what ;)
please attach stuff plaintext scandium is much easier. and the fix seems pretty straightforward, so i don't doubt it works. But the ebuild is not correct, you need to run automake & conf to make the test be incorporated in relevant automake/configure scripts.
The ebuild + patches found here should work for every situation now http://dev.gentoo.org/~scandium/pnet/ if there are no objections I'll commit it like that. (Note: libtoolize etc. and setting WANT_AUTOMAKE/CONF.... isn't really necessary here, that's why I left it out)
perhaps it would be more elegant to use their autogen.sh ... *changing now* ;)
I fine-tuned it a bit and tested it on other boxes and the bug is fixed for sure now.
yes, altough a well packaged source tarball release shouldnt leave it's autogen script in. But it basicly does the same. Scandium, please do attach scripts/ebuilds/patches etc. to the bug, webspace may not be up etc. It's really easier to have it physically in one place.