Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 23552 - emerge pnetlib aborts due to non-existant X11 headers
Summary: emerge pnetlib aborts due to non-existant X11 headers
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: dotnet project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-26 16:43 UTC by John Wood
Modified: 2003-07-02 16:23 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
pnet-0.5.8 X11 check (pnet-0.5.8-X11.tar.gz,1.91 KB, application/octet-stream)
2003-07-02 06:57 UTC, Rainer Größlinger (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Wood 2003-06-26 16:43:37 UTC
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"
Comment 1 Rainer Größlinger (RETIRED) gentoo-dev 2003-07-01 06:26:02 UTC
I will look into this
Comment 2 foser (RETIRED) gentoo-dev 2003-07-02 04:07:57 UTC
you have a group to look into it, use it.
Comment 3 Rainer Größlinger (RETIRED) gentoo-dev 2003-07-02 04:34:23 UTC
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.
Comment 4 Rainer Größlinger (RETIRED) gentoo-dev 2003-07-02 06:57:01 UTC
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)
Comment 5 Rainer Größlinger (RETIRED) gentoo-dev 2003-07-02 08:17:33 UTC
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 ;)
Comment 6 foser (RETIRED) gentoo-dev 2003-07-02 08:54:46 UTC
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.
Comment 7 Rainer Größlinger (RETIRED) gentoo-dev 2003-07-02 09:20:51 UTC
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)
Comment 8 Rainer Größlinger (RETIRED) gentoo-dev 2003-07-02 09:27:38 UTC
perhaps it would be more elegant to use their autogen.sh ... *changing now* ;)
Comment 9 Rainer Größlinger (RETIRED) gentoo-dev 2003-07-02 09:54:26 UTC
I fine-tuned it a bit and tested it on other boxes and the bug is fixed for sure now.
Comment 10 foser (RETIRED) gentoo-dev 2003-07-02 16:23:22 UTC
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.