Re: NSPR build

Jonathan Leighton <[email protected]> Thu, 28 May 2009 12:43:54 -0400
Newsgroups gmane.comp.mozilla.devel.nspr
Message-ID <[email protected]>
VinuT wrote:
> Yes, I do use GNU make. (make -v shows that), although i cannot find the 
> gmake command.
> 
> I tried building NSPR 4.7.4 with the suggestions you provided and the 
> build seems to go fine, except it fails at final linking stage
> and gives the error.
> 
> Undefined                       first referenced
> symbol                             in file
> __eprintf                           misc/./prerrortable.o
> ld: fatal: Symbol referencing errors. No output written to libnspr4.so
> collect2: ld returned 1 exit status
> make[2]: *** [libnspr4.so] Error 1
> make[2]: Leaving directory 
> `/space/xxs/tmp/nspr-4.6.4/mozilla/nsprpub/pr/src'
> make[1]: *** [export] Error 2
> 
> 
> I tried doing a grep for the symbol _eprint in the NSPR directories but 
> couldnt find it anywhere. So whats wrong here?
> 
> I read on the internet that eprintf is a symbol referenced by the gcc 
> Assert macro and doing -DNDEBUG as a build option will make the error go 
> away.
> However I do not know how to pass this option to make.
> Can anybody help me?

Use the --disable-debug option when you run configure.

$ ../nsprpub/configure --disable-debug

- Jon

> 
> Thanks
> Vinu
> 
> "Wan-Teh Chang" <[email protected]> wrote in message 
> news:[email protected]...
>> On Wed, May 27, 2009 at 3:04 PM, Vinu 
>> <[email protected]> wrote:
>>> Hi,
>>>
>>> I just downloaded the sources for NSPR 4.7.4 for a Solaris build.
>>>
>>> I unzipped and untarred the file and then
>>>
>>> cd mozilla/nsprpub
>>> ./configure
>>>
>>> Here it tries to use the Sun C compiler, but I want to use gcc, So i did
>>>
>>> ./configure NS_USE_GCC=1
>>
>> Please configure NSPR as follows to use gcc:
>>
>> In Bourne shell, Korn shell, or Bash:
>>    CC=gcc CXX=g++ ./configure
>>
>> In C shell or tcsh:
>>    env CC=gcc CXX=g++ ./configure
>>
>> Then just type 'gmake'.  If you use 'make', please first run 'make -v' to
>> verify that it is GNU make.  Our makefiles require GNU make.
>>
>> Wan-Teh 
>