Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 17493 - povray-3.50a.ebuild fails to compile povray, since there is a complain of an undefined reference to a pthread function.
Summary: povray-3.50a.ebuild fails to compile povray, since there is a complain of an ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Stefan Jones (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-14 06:21 UTC by Chris Young
Modified: 2003-03-16 22:39 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Young 2003-03-14 06:21:49 UTC
When trying to emerge povray, the compilation process gets all the way through until it comes time to link into a binary.  An undefined reference error then occurs because it's expecting a -lpthread.  I have included a diff.

Reproducible: Always
Steps to Reproduce:
1. emerge povray
2. Wait for compile to complete


Actual Results:  
The following error occurs:

g++  `if [ "Xgcc" = "Xgcc" ]; then echo "-Wno-multichar"; fi ` -static  -I/usr/X11R6/include -o povray  atmosph.o bbox.o bcyl.o benchmark.o bezier.o blob.o boxes.o bsphere.o camera.o chi2.o colour.o colutils.o cones.o csg.o discs.o express.o file_pov.o fncode.o fnintern.o fnpovfpu.o fnsyntax.o fpmetric.o fractal.o function.o gif.o gifdecod.o hcmplx.o hfield.o histogra.o iff.o image.o interior.o isosurf.o jpeg_pov.o lathe.o lbuffer.o lightgrp.o lighting.o matrices.o media.o mesh.o normal.o objects.o octree.o optin.o optout.o parse.o parsestr.o parstxtr.o pattern.o pgm.o photons.o pigment.o planes.o png_pov.o point.o poly.o polygon.o polysolv.o pov_mem.o povms.o povmscpp.o povmsend.o povmsrec.o povray.o pov_util.o ppm.o prism.o quadrics.o quatern.o rad_data.o radiosit.o ray.o render.o renderio.o sor.o spheres.o sphsweep.o splines.o statspov.o super.o targa.o texture.o tiff_pov.o tokenize.o torus.o triangle.o truetype.o txttest.o userdisp.o userio.o vbuffer.o vlbuffer.o warps.o unix.o povxlib.o -L/usr/X11R6/lib -ltiff -ljpeg -lpng -lz -lm  -lX11 -ldl
/usr/X11R6/lib/libX11.a(XlibInt.o)(.text+0x4a): In function `_XEventsQueued':
: undefined reference to `pthread_equal'
/usr/X11R6/lib/libX11.a(XlibInt.o)(.text+0x40e): In function `_XEventsQueued':
: undefined reference to `pthread_equal'
/usr/X11R6/lib/libX11.a(XlibInt.o)(.text+0x427): In function `_XEventsQueued':
: undefined reference to `pthread_equal'
/usr/X11R6/lib/libX11.a(XlibInt.o)(.text+0x443): In function `_XEventsQueued':
: undefined reference to `pthread_equal'
/usr/X11R6/lib/libX11.a(XlibInt.o)(.text+0x460): In function `_XEventsQueued':
: undefined reference to `pthread_equal'
/usr/X11R6/lib/libX11.a(XlibInt.o)(.text+0x4f6): more undefined references to `pthread_equal' follow
collect2: ld returned 1 exit status
make: *** [povray] Error 1

!!! ERROR: media-gfx/povray-3.50a failed.
!!! Function src_compile, Line 83, Exitcode 2
!!! (no error message)


Expected Results:  
Successfully created the povray binary

I'm new to gentoo /and/ submitting bugs.  I would appreciate feedback if I did anything wrong, otherwise I'll make the same mistake in the future and waste more of people's time.

Here is a unified diff:
--- povray-3.50a.ebuild.old     2003-03-14 22:05:41.000000000 +1100
+++ povray-3.50a.ebuild 2003-03-14 22:19:03.000000000 +1100
@@ -69,7 +69,7 @@
        fi
 
     # fix library dependency
-       echo 's/LIBS = \(.*\)/LIBS = \1 -ldl/' >> makefile.sed
+       echo 's/LIBS = \(.*\)/LIBS = \1 -ldl -lpthread/' >> makefile.sed
 
        cp Makefile Makefile.orig
        sed -f makefile.sed Makefile.orig > Makefile

I don't know that there's a point in pasting emerge info, but here it is:

Portage 2.0.47-r8 (default-x86-1.4, gcc-3.2.2, glibc-2.3.2-r0)
=================================================================
System uname: 2.4.20-gentoo-r1 i686 Pentium III (Katmai)
GENTOO_MIRRORS="http://mirror.aarnet.edu.au/pub/gentoo/ http://gentoo.oregonstate.edu/ http://www.ibiblio.org/pub/Linux/distributions/gentoo"
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb"
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=""
USE="x86 oss 3dnow apm arts avi crypt cups encode gif imlib java jpeg libg++ libwww mikmod mmx mpeg ncurses nls pdflib png quicktime sdl spell truetype xml2 xmms xv zlib gdbm berkdb slang readline X gpm tcpd pam ssl perl python oggvorbis motif opengl qt kde -gtk -gnome -alsa -svga"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer"
CXXFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer"
ACCEPT_KEYWORDS="x86 ~x86"
MAKEOPTS="-j2"
AUTOCLEAN="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
FEATURES="sandbox ccache"
Comment 1 Stefan Jones (RETIRED) gentoo-dev 2003-03-14 06:46:08 UTC
It is a bit strange that X11 needs pthreads, but not that strange as I know it can be thread aware.

I will change the fix, so it only adds pthread library if X is used.

Anyway, I have added the fix, many thanks. If only all bug reports were like this!

Please test, and close bug if it works.

Stefan
Comment 2 Chris Young 2003-03-16 22:39:19 UTC
It works now, thanks.