pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg/47233: xulrunner DragonFly x86_64 call of overloaded 'FromTicks(long long int)' is ambiguous
The following reply was made to PR pkg/47233; it has been noted by GNATS.
From: David Shao <davshao%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: John Marino <netbsd%marino.st@localhost>, John Marino
<marino%netbsd.org@localhost>
Subject: Re: pkg/47233: xulrunner DragonFly x86_64 call of overloaded
'FromTicks(long long int)' is ambiguous
Date: Mon, 26 Nov 2012 21:51:46 -0800
As I have reported on the DragonFly bug tracking system,
http://bugs.dragonflybsd.org/issues/2463
a minimal C++ test file cpperrno.cpp has been written that shows why
pkgsrc current devel/xulrunner for firefox 17.0esr breaks only on
DragonFly, not on other platforms such as NetBSD. Executing
$ c++ cpperrno.cpp
$ ./a.out
on platforms other than DragonFly produces output
errno = 22
while DragonFly produces an error:
$ c++ cpperrno.cpp
/tmp//ccTk4OGn.o: In function `(anonymous namespace)::__error()':
cpperrno.cpp:(.text+0x10): undefined reference to `(anonymous
namespace)::errno'
A brief inspection of DragonFly's source code reveals in
/usr/src/sys/sys/errno.h a declaration using the __thread storage
class keyword for thread-local storage (TLS):
#if !defined(_KERNEL) || defined(_KERNEL_VIRTUAL)
extern __thread int errno;
Obviously the immediate reaction would appear to be "Fix DragonFly."
But the use of __thread is there for a reason, excising it would
appear to have possibly hard to predict breakage for other userland
programs on DragonFly, and a more elaborate mechanism for TLS would
appear to require some time to implement. In the interim, I would
like to ask what are the limits for hackery that would simply allow
devel/xulrunner to build again on DragonFly, hackery such as adding a
fair number of #ifdef's only for DragonFly?
/* begin cpperrno.cpp */
namespace {
#pragma GCC visibility push(default)
#include <errno.h>
#pragma GCC visibility pop
void innamespace() {
errno = EINVAL;
}
} /* end namespace */
extern "C" {
void seterrno() {
innamespace();
}
} /* end extern */
#include <stdio.h>
#include <errno.h>
int main() {
seterrno();
printf("errno = %d\n", errno);
return errno;
}
/* end cpperrno.cpp */
Home |
Main Index |
Thread Index |
Old Index