Subject: Re: Can't build pdflib
To: None <netbsd-help@netbsd.org>
From: Scott Lahteine <lscott44@qwest.net>
List: netbsd-help
Date: 01/11/2005 16:47:39
Thanks, Christos!

The tip helps if I go to the proper directory and change cc to g++ 
within that single command. But how can I get the whole package and/or 
its parts to build using g++ in the appropriate places in a 
reproducible way?

The problem is, if I go back to the top (pkgsrc/graphics/tiff) to 
continue the build, then it hits other similar trouble spots. In each 
case I located and edited the appropriate Makefile changing cc to g++ 
in the opening defines. However, I hit a wall with the "xtiff" 
sub-package, which still insists on using "cc" no matter how I alter 
its local Makefile.

Worst of all if I do "make clean" then the next build recreates all the 
Makefiles, and I have to start all over again, letting each item fail 
and doing the edits again, only to hit the same wall with xtiff.

Is there some environment variable I can set to get the build process 
to use g++ in the right places? (I even tried replacing /usr/bin/cc 
with a symbolic link to g++ to no avail.)

- Scott Lahteine
	Native Seed Network

On Jan 10, 2005, at 5:07 PM, Christos Zoulas wrote:
> In article <043E1550-6357-11D9-A069-000D932BC80C@qwest.net>,
> Scott Lahteine <lscott44@qwest.net> wrote:
>> Hi,
>>
>> I recently needed to upgrade a server running NetBSD 1.5.3_RC1
>> (GENERIC) to alleviate a few security vulnerabilities. I've gotten
>> every other package updated, but I am unable to build pdflib
>> successfully. It fails during the build of libtiff. The following
>> command in the build process fails with the error shown below:
>
> try changing cc to g++ in the following line.
>
> christos
>>
>> cc -O2 -I/usr/pkgsrc/graphics/tiff/work/.buildlink/include
>> -Wl,-R/usr/pkg/lib -o .libs/bmp2tiff bmp2tiff.o
>> -L/usr/pkgsrc/graphics/tiff/work/.buildlink/lib
>> ../libtiff/.libs/libtiff.so ../port/.libs/libport.a
>> /usr/pkgsrc/graphics/tiff/work/.buildlink/lib/libjpeg.so
>> /usr/pkgsrc/graphics/tiff/work/.buildlink/lib/libz.so -lm -lc
>> -Wl,--rpath -Wl,/usr/pkg/lib -Wl,--rpath
>> -Wl,/usr/pkgsrc/graphics/tiff/work/.buildlink/lib
>>
>> /usr/lib/libstdc++.so.2: undefined reference to `__builtin_vec_new'
>> /usr/lib/libstdc++.so.2: undefined reference to `__builtin_vec_delete'
>>
>>
>> Apparently this is a common issue, but so far I have been unable to
>> locate a definitive solution. I've tried building gcc again in order 
>> to
>> get an updated libstdc++ but the build of gcc fails like so:
>>
>> /usr/bin/ld: cannot open -lgcc_pic: No such file or directory
>>
>>
>> How can I resolve these issues and get these packages to build?
>>
>> - Scott Lahteine
>>   Native Seed Network