Closed Bug 321579 Opened 19 years ago Closed 19 years ago

BeOS build broken creating autoconfig

Categories

(NSPR :: NSPR, defect)

x86
BeOS
defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: doug, Assigned: wtc)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (BeOS; U; BeOS BePC; en-US; rv:1.9a1) Gecko/20051221 Firefox/1.6a1
Build Identifier: Mozilla/5.0 (BeOS; U; BeOS BePC; en-US; rv:1.9a1) Gecko/20051221 Firefox/1.6a1

BeOS building broke sometime between 2005-12-21 and -26.  Error output is:

make[6]: Entering directory `/boot/home/develop/mozilla/opt-DEBUG/nsprpub/pr/src/linking'
gcc -o prlink.o -c      -pipe -gdwarf-2 -O0   -UNDEBUG -DDEBUG_baron  -DMOZILLA_CLIENT=1 -DDEBUG=1 -DXP_BEOS=1 -DBeOS=1 -DBEOS=1 -D_POSIX_SOURCE=1 -DHAVE_STRERROR=1  -DFORCE_PR_LOG -D_NSPR_BUILD_ -I/boot/home/develop/mozilla/opt-DEBUG/dist/include/nspr -I/boot/home/develop/mozilla/nsprpub/pr/include -I/boot/home/develop/mozilla/nsprpub/pr/include/private  /boot/home/develop/mozilla/nsprpub/pr/src/linking/prlink.c
/boot/home/develop/mozilla/nsprpub/pr/src/linking/prlink.c: In function `PR_GetLibraryFilePathname':
/boot/home/develop/mozilla/nsprpub/pr/src/linking/prlink.c:1393: `Dl_info' undeclared (first use in this function)
/boot/home/develop/mozilla/nsprpub/pr/src/linking/prlink.c:1393: (Each undeclared identifier is reported only once
/boot/home/develop/mozilla/nsprpub/pr/src/linking/prlink.c:1393: for each function it appears in.)
/boot/home/develop/mozilla/nsprpub/pr/src/linking/prlink.c:1393: parse error before `dli'
/boot/home/develop/mozilla/nsprpub/pr/src/linking/prlink.c:1396: `dli' undeclared (first use in this function)
make[6]: *** [prlink.o] Error 1
make[6]: Leaving directory `/boot/home/develop/mozilla/opt-DEBUG/nsprpub/pr/src/linking'
make[5]: *** [export] Error 2
make[5]: Leaving directory `/boot/home/develop/mozilla/opt-DEBUG/nsprpub/pr/src'
make[4]: *** [export] Error 2
make[4]: Leaving directory `/boot/home/develop/mozilla/opt-DEBUG/nsprpub/pr'
make[3]: *** [export] Error 2
make[3]: Leaving directory `/boot/home/develop/mozilla/opt-DEBUG/nsprpub'
make[2]: *** [nspr] Error 2
make[2]: Leaving directory `/boot/home/develop/mozilla/opt-DEBUG'
make[1]: *** [alldep] Error 2
make[1]: Leaving directory `/boot/home/develop/mozilla/opt-DEBUG'
make: *** [alldep] Error 2
$                                  

Reproducible: Always

Steps to Reproduce:
1.attempt to build from CVS
2.
3.

Actual Results:  
build fails

Expected Results:  
build completes
Product: Firefox → Core
QA Contact: build.config → build-config
Version: unspecified → Trunk
Is __GLIBC__ defined on BeOS?
Unexpectedly, it is defined. 

/boot/develop/headers/posix/be_setup.h:# define __GLIBC__                      -2
Status: UNCONFIRMED → NEW
Ever confirmed: true
Is __GLIBC__ defined to be -2? That's a strange value.

Please try changing lines 1391-1392 of
mozilla/nsprpub/pr/src/linking/prlink.c to:

#if defined(USE_DLFCN) && (defined(SOLARIS) || defined(FREEBSD) \
        || defined(LINUX) || defined(__GNU__) || defined(__GLIBC__))

Does that allow the build to complete successfully?

Another possible fix is:

#if defined(SOLARIS) || defined(FREEBSD) \
        || defined(LINUX) || defined(__GNU__) || __GLIBC__ >= 2

Does this also work?
(In reply to comment #1)
> https://bugzilla.mozilla.org/show_bug.cgi?id=321230

my build with that patch worked for me. so, I'd say that's unrelated...
(In reply to comment #4)
> Is __GLIBC__ defined to be -2? That's a strange value.
> 
> Please try changing lines 1391-1392 of
> mozilla/nsprpub/pr/src/linking/prlink.c to:
> 
> #if defined(USE_DLFCN) && (defined(SOLARIS) || defined(FREEBSD) \
>         || defined(LINUX) || defined(__GNU__) || defined(__GLIBC__))
> 
> Does that allow the build to complete successfully?

Yes.  This change allows the build to get past prlink.  Once this build completes, I'll try the second option.
> 
> Another possible fix is:
> 
> #if defined(SOLARIS) || defined(FREEBSD) \
>         || defined(LINUX) || defined(__GNU__) || __GLIBC__ >= 2
> 
> Does this also work?
> 

No.  With this fix, the build fails as before.
Could you compile and run this test program on BeOS?
Please compile it with and without "-D_POSIX_SOURCE=1".
Thanks.

#include <stdio.h>

int main()
{
#ifdef __GNU__
    printf("__GNU__ is %d\n", __GNU__);
#endif
#ifdef __GLIBC__
    printf("__GLIBC__ is %d\n", __GLIBC__);
#endif
    return 0;
}
(In reply to comment #8)
> Could you compile and run this test program on BeOS?
I saved as "glibctest.cpp"  Results are:
$ c++ glibctest.cpp
$ glibctest
__GLIBC__ is 2
$ rm glibctest
$ c++ -D_POSIX_SOURCE=1 glibctest.cpp
$ glibctest
__GLIBC__ is 2
$
 
I hope this helps.
Btw, i think that coming Zeta version will drop glibc and use BSD's version of libc instead. So maybe that definition for POSIX will disappear too.
Attached patch Proposed patchSplinter Review
This is the fix that Doug Shelton verified in comment 6.
I've checked it in on the NSPRPUB_PRE_4_2_CLIENT_BRANCH
(Mozilla/Gecko 1.9 alpha).

Checking in prlink.c;
/cvsroot/mozilla/nsprpub/pr/src/linking/prlink.c,v  <--  prlink.c
new revision: 3.51.2.30; previous revision: 3.51.2.29
done

Could you nominate someone who is familiar with BeOS's
use of glibc?  I need to ask him to review our patch in
bug 261649, which assumes that glibc is only used by
GNU/Linux, GNU/Hurd, and GNU/k*BSD.
Assignee: nobody → wtchang
Component: Build Config → NSPR
Product: Core → NSPR
QA Contact: build-config → wtchang
Target Milestone: --- → 4.7
Version: Trunk → 4.7
Hi!

Just wanted to clarify a pair of things:

  - My patch didn't really assume Glibc only runs on GNU/Linux, GNU/Hurd, and GNU/k*BSD.  My intention was to assume only that the port of Glibc was complete (I'm not sure if that's the case for BeOS).

  - __GNU__ is defined on GNU/Hurd exclussively, and used everywhere to conditionalise Hurd-specific code, so I don't any non-Hurd system would want to define that macro.

Hope that helps
(In reply to comment #11)
> Could you nominate someone who is familiar with BeOS's
> use of glibc?  I need to ask him to review our patch in
> bug 261649, which assumes that glibc is only used by
> GNU/Linux, GNU/Hurd, and GNU/k*BSD.
> 
I am not familiar, but I'm hoping fyysik (sergei_d) or biesi might be able to help.
(In reply to comment #11)
> Could you nominate someone who is familiar with BeOS's
> use of glibc?  I need to ask him to review our patch in
> bug 261649, which assumes that glibc is only used by
> GNU/Linux, GNU/Hurd, and GNU/k*BSD.
> 
The person most familiar is Sergei_d, but he is unavailable for the near future.  I'll inquire elsewhere in the BeOS dev community to see if we can find someone to review this patch.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: