pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/51560: compiler wrapper linking wrong gcc libs



>Number:         51560
>Category:       pkg
>Synopsis:       compiler wrapper linking wrong gcc libs
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Oct 18 13:15:00 +0000 2016
>Originator:     reed%reedmedia.net@localhost
>Release:        Ubuntu 14.04.5 LTS Linux
>Organization:
>Environment:
Linux work1 3.19.0-59-generic #66~14.04.1-Ubuntu SMP Fri May 13 17:27:10 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
>Description:

Using pkgsrc on Ubuntu Linux.

Almost every library I build fails like:

libtool: link: g++  -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.6.1/crtbeginS.o  src/.libs/gmock-all.o   -L/home/reed/src/netbsd/pkgsrc/devel/gmock/work/.buildlink/lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6.1 -L/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-linux-gnu/4.6.1/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/crtn.o  -pthread -O2 -Wl,-R/home/reed/pkg/lib   -pthread -Wl,-soname -Wl,libgmock.so.0 -o lib/.libs/libgmock.so.0.0.0
g++-4.8.real: error: /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/crti.o: No such file or directory
g++-4.8.real: error: /usr/lib/gcc/x86_64-linux-gnu/4.6.1/crtbeginS.o: No such file or directory
g++-4.8.real: error: /usr/lib/gcc/x86_64-linux-gnu/4.6.1/crtendS.o: No such file or directory
g++-4.8.real: error: /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/crtn.o: No such file or directory
*** Error code 1

(Note I didn't try recently before Sept. 28
so don't know when problem started.)

See the 4.8 gcc being used but the library path says "4.6.1".
I do have a 
gcc-4.6.real (Ubuntu/Linaro 4.6.4-6ubuntu2) 4.6.4

But not 4.6.1. For example:

/usr/lib/gcc/x86_64-linux-gnu//4.6.4/crtbeginS.o
/usr/lib/gcc/x86_64-linux-gnu//4.6/crtbeginS.o
/usr/lib/gcc/x86_64-linux-gnu//4.8.4/crtbeginS.o
/usr/lib/gcc/x86_64-linux-gnu//4.8/crtbeginS.o

I am not sure where this 4.6.1 reference comes from.
work/.wrapper/tmp/cache and work/.wrapper/tmp/cache-body refers to it.

My workaround is to go into the WRKSRC directory and do the bmake or gmake
there. It compiles fine without the wrapper. Then I go back to the
pkgsrc directory and do the bmake install.

Another example is net/zeromq
  CXXLD    libzmq.la
g++-4.8.real: error: /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/crti.o: No such file or directory
g++-4.8.real: error: /usr/lib/gcc/x86_64-linux-gnu/4.6.1/crtbeginS.o: No such file or directory
g++-4.8.real: error: /usr/lib/gcc/x86_64-linux-gnu/4.6.1/crtendS.o: No such file or directory
g++-4.8.real: error: /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/crtn.o: No such file or directory

I did a make in the work directory
and then all was well
I guess some wrapper hid those
and it couldn't find the ones in the other directories

And another was devel/msgpack:

libtool: link: g++  -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.6.1/crtbeginS.o  .libs/unpack.o .libs/objectc.o .libs/version.o .libs/vrefbuffer.o .libs/zone.o .libs/object.o   -L/home/reed/src/netbsd/pkgsrc/devel/msgpack/work/.buildlink/lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6.1 -L/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-linux-gnu/4.6.1/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/crtn.o  -O3 -O2 -Wl,-R/home/reed/pkg/lib   -Wl,-soname -Wl,libmsgpack.so.3 -o .libs/libmsgpack.so.3.0.0
g++-4.8.real: error: /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/crti.o: No such file or directory
g++-4.8.real: error: /usr/lib/gcc/x86_64-linux-gnu/4.6.1/crtbeginS.o: No such file or directory
g++-4.8.real: error: /usr/lib/gcc/x86_64-linux-gnu/4.6.1/crtendS.o: No such file or directory
g++-4.8.real: error: /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/crtn.o: No such file or directory
*** Error code 1

notice is is 4.8 but using 4.6.1
should be using 4.8 too

>How-To-Repeat:
On Ubuntu Linux
cd pkgsrc/devel/gmock
bmake install

also happened in googletest and other packages.
>Fix:
	

>Unformatted:
 	
 	


Home | Main Index | Thread Index | Old Index