Bug 162221

Summary: 9.0-RC1 new problem building lang/spidermonkey
Product: Ports & Packages Reporter: Stephen Hurd <shurd>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Stephen Hurd freebsd_committer freebsd_triage 2011-11-01 09:40:10 UTC
After upgrading from 8.2-RELEASEp3 to 9.0-RC1 using freebsd-update, it is no longer possible to manually build the spidermonkey JS engine with the included gcc.

The error is:
jsnativestack.o: In function `js::GetNativeStackBaseImpl()':
jsnativestack.cpp:(.text+0x35): undefined reference to `pthread_attr_get_np'
/usr/bin/ld: libmozjs185.so: hidden symbol `pthread_attr_get_np' isn't defined
/usr/bin/ld: final link failed: Nonrepresentable section on output

Fix: 

Completely unknown.  I worked around it by setting # pragma GCC visibility push(default) before the pthread.h include and popping it after the pthread_np.h include.

It doesn't appear that this is a correct fix though and the www/firefox etc ports don't seem to have ran into it.
How-To-Repeat: - Install devel/gmake and devel/nspr4 on a 9.0-RC1 system.
- Download http://ftp.mozilla.org/pub/mozilla.org/js/js185-1.0.0.tar.gz
- Change to the js-1.8.5/js/src directory
- Run configure with no arguments
- Run gmake
Comment 1 Gavin Atkinson freebsd_committer freebsd_triage 2011-11-01 12:24:16 UTC
Responsible Changed
From-To: freebsd-threads->freebsd-ports-bugs

This looks likely to be a port bug.
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2011-11-01 12:36:51 UTC
Maintainer of lang/spidermonkey,

Please note that PR ports/162221 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/162221

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 3 Edwin Groothuis freebsd_committer freebsd_triage 2011-11-01 12:36:52 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 4 buoqla 2011-11-01 20:53:40 UTC
Stephen Hurd <shurd@sasktel.net> writes:

> jsnativestack.o: In function `js::GetNativeStackBaseImpl()':
> jsnativestack.cpp:(.text+0x35): undefined reference to `pthread_attr_get_np'
> /usr/bin/ld: libmozjs185.so: hidden symbol `pthread_attr_get_np' isn't defined
> /usr/bin/ld: final link failed: Nonrepresentable section on output
[...]
>>Fix:
> Completely unknown.  I worked around it by setting # pragma GCC
> visibility push(default) before the pthread.h include and popping it
> after the pthread_np.h include.

Mk/bsd.gecko.mk uses similar fix, i.e.

  $ rm -f jsnativestack.o
  $ echo pthread_np.h >>config/system-headers
  $ gmake

which is probably caused by r215840.
Comment 5 hurds 2011-11-01 22:05:35 UTC
On Tue, 01 Nov 2011 20:53:40 +0000, Kva La=C2=A0 wrote:
Stephen Hurd <shurd@sasktel.net> writes:

> Mk/bsd.gecko.mk uses similar fix, i.e. 
>
>   $ rm -f jsnativestack.o
>   $ echo pthread_np.h >>config/system-headers
>   $ gmake
>
> which is probably caused by r215840. 

So is this a configure bug in the mozilla sources or a regression due 
to r215840? =C2=A0Has a GCC guru looked at this?
Comment 6 Philip M. Gollucci freebsd_committer freebsd_triage 2012-02-09 23:08:54 UTC
State Changed
From-To: feedback->open

maintainer timeout (citric@cubicone.tmetic.com ; 99 days)
Comment 7 Eitan Adler freebsd_committer freebsd_triage 2012-09-08 02:52:29 UTC
State Changed
From-To: open->closed

this should have been fixed recently. if not ping me and I'll reopen