Re: Possible fix for Perl failing with ../lib/auto/POSIX/POSIX.so: Undefined symbol "__flt_rounds" on ARM

2012-06-14 Thread Tim Kientzle

On Jun 14, 2012, at 5:34 AM, Konstantin Belousov wrote:

> On Wed, Jun 13, 2012 at 08:32:19PM -0700, Tim Kientzle wrote:
>> On Jun 12, 2012, at 1:49 AM, Konstantin Belousov wrote:
> 
> On Jun 5, 2012, at 8:09 AM, Jan Sieka wrote:
>> 
>> 
>> After investigating the issue it appeared that __flt_rounds symbol is
>> not exported by libc. Applying the following patch, recompilling world
>> and Perl fixed the problem and allowed to use Perl on SheevaPlug:
>> 
>> diff --git a/lib/libc/arm/Symbol.map b/lib/libc/arm/Symbol.map
>> index e8c7f1d..8cdcdaf 100644
>> --- a/lib/libc/arm/Symbol.map
>> +++ b/lib/libc/arm/Symbol.map
>> @@ -70,6 +70,7 @@ FBSDprivate_1.0 {
>>  __divdf3;
>>  __floatsisf;
>>  __floatsidf;
>> +   __flt_rounds;
>>  __fixsfsi;
>>  __fixdfsi;
>>  __fixunssfsi;
>> 
>> 
>>> If the symbols are used by normal programs, that I think
>>> we should indeed guarantee ABI stability for them, and FBSD_1.3
>>> namespace is the right namespace to use.
>> 
>> Why 1.3?
>> 
>> This is a common function across every architecture except MIPS right
>> now (and that's probably easily remedied), so why would it be in
>> a different section for different architectures?
> 
> The libc.so built as a result is architecture-specific, so it shall
> follow the ABI and ABI history of that architecture. By the project
> policy, a symbol added during the lifetime of CURRENT-10, goes into
> FBSD_1.3 version namespace. What other arches do there is irrelevant.

Changed in r237110.

Tim
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Possible fix for Perl failing with ../lib/auto/POSIX/POSIX.so: Undefined symbol "__flt_rounds" on ARM

2012-06-14 Thread Konstantin Belousov
On Wed, Jun 13, 2012 at 08:32:19PM -0700, Tim Kientzle wrote:
> On Jun 12, 2012, at 1:49 AM, Konstantin Belousov wrote:
> >>> 
> >>> On Jun 5, 2012, at 8:09 AM, Jan Sieka wrote:
>  
>  
>  After investigating the issue it appeared that __flt_rounds symbol is
>  not exported by libc. Applying the following patch, recompilling world
>  and Perl fixed the problem and allowed to use Perl on SheevaPlug:
>  
>  diff --git a/lib/libc/arm/Symbol.map b/lib/libc/arm/Symbol.map
>  index e8c7f1d..8cdcdaf 100644
>  --- a/lib/libc/arm/Symbol.map
>  +++ b/lib/libc/arm/Symbol.map
>  @@ -70,6 +70,7 @@ FBSDprivate_1.0 {
>    __divdf3;
>    __floatsisf;
>    __floatsidf;
>  +   __flt_rounds;
>    __fixsfsi;
>    __fixdfsi;
>    __fixunssfsi;
> 
> 
> >  If the symbols are used by normal programs, that I think
> > we should indeed guarantee ABI stability for them, and FBSD_1.3
> > namespace is the right namespace to use.
> 
> Why 1.3?
> 
> This is a common function across every architecture except MIPS right
> now (and that's probably easily remedied), so why would it be in
> a different section for different architectures?

The libc.so built as a result is architecture-specific, so it shall
follow the ABI and ABI history of that architecture. By the project
policy, a symbol added during the lifetime of CURRENT-10, goes into
FBSD_1.3 version namespace. What other arches do there is irrelevant.


pgpYhZNIoMizu.pgp
Description: PGP signature


Re: Possible fix for Perl failing with ../lib/auto/POSIX/POSIX.so: Undefined symbol "__flt_rounds" on ARM

2012-06-13 Thread Tim Kientzle
On Jun 12, 2012, at 1:49 AM, Konstantin Belousov wrote:
>>> 
>>> On Jun 5, 2012, at 8:09 AM, Jan Sieka wrote:
 
 
 After investigating the issue it appeared that __flt_rounds symbol is
 not exported by libc. Applying the following patch, recompilling world
 and Perl fixed the problem and allowed to use Perl on SheevaPlug:
 
 diff --git a/lib/libc/arm/Symbol.map b/lib/libc/arm/Symbol.map
 index e8c7f1d..8cdcdaf 100644
 --- a/lib/libc/arm/Symbol.map
 +++ b/lib/libc/arm/Symbol.map
 @@ -70,6 +70,7 @@ FBSDprivate_1.0 {
   __divdf3;
   __floatsisf;
   __floatsidf;
 +   __flt_rounds;
   __fixsfsi;
   __fixdfsi;
   __fixunssfsi;


>  If the symbols are used by normal programs, that I think
> we should indeed guarantee ABI stability for them, and FBSD_1.3
> namespace is the right namespace to use.

Why 1.3?

This is a common function across every architecture except MIPS right
now (and that's probably easily remedied), so why would it be in
a different section for different architectures?

Tim


___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Possible fix for Perl failing with ../lib/auto/POSIX/POSIX.so: Undefined symbol "__flt_rounds" on ARM

2012-06-13 Thread Tim Kientzle

On Jun 12, 2012, at 1:26 PM, Konstantin Belousov wrote:

> On Tue, Jun 12, 2012 at 05:56:12PM +0200, Jan Sieka wrote:
>> Both versions work indeed. I have analysed other architectures' 
>> lib/libc//Symbol.map files and __flt_rounds should go into FBSD_ and 
>> *not* into FBSDprivate section. I have verified that at least one of the 
>> Perl's libraries (POSIX.so) links to __flt_rounds. Python also links to 
>> this function. So to the best of my knowledge current patch is the 
>> righteous one.
> 
> Let me restate my point again. It does not matter whether some application
> uses the symbol. It does matter whether the symbol is considered the part
> of exported stable ABI, intended for use by applications. If it is, then
> FBSD_1.X is the right namespace, otherwise symbol should be moved to
> private and existing usage fixed.

That particular symbol is in FBSD_1.0 for amd64, i386, ia64, powerpc, 
powerpc64, sparc64.
It's in FBSDPrivate_1.0 for arm.
It's not defined for mips at all.

The latter two seem to be bugs; I just committed r237039 to fix arm.

I haven't checked the situation on mips.

Tim




___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Possible fix for Perl failing with ../lib/auto/POSIX/POSIX.so: Undefined symbol "__flt_rounds" on ARM

2012-06-12 Thread Ian Lepore
On Tue, 2012-06-12 at 23:26 +0300, Konstantin Belousov wrote:
> On Tue, Jun 12, 2012 at 05:56:12PM +0200, Jan Sieka wrote:
> > Both versions work indeed. I have analysed other architectures' 
> > lib/libc//Symbol.map files and __flt_rounds should go into FBSD_ and 
> > *not* into FBSDprivate section. I have verified that at least one of the 
> > Perl's libraries (POSIX.so) links to __flt_rounds. Python also links to 
> > this function. So to the best of my knowledge current patch is the 
> > righteous one.
> 
> Let me restate my point again. It does not matter whether some application
> uses the symbol. It does matter whether the symbol is considered the part
> of exported stable ABI, intended for use by applications. If it is, then
> FBSD_1.X is the right namespace, otherwise symbol should be moved to
> private and existing usage fixed.

The standard C macro FLT_ROUNDS from float.h expands to the reference to
__flt_rounds; it's intended for use by applications.

-- Ian


___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Possible fix for Perl failing with ../lib/auto/POSIX/POSIX.so: Undefined symbol "__flt_rounds" on ARM

2012-06-12 Thread Konstantin Belousov
On Tue, Jun 12, 2012 at 05:56:12PM +0200, Jan Sieka wrote:
> Both versions work indeed. I have analysed other architectures' 
> lib/libc//Symbol.map files and __flt_rounds should go into FBSD_ and 
> *not* into FBSDprivate section. I have verified that at least one of the 
> Perl's libraries (POSIX.so) links to __flt_rounds. Python also links to 
> this function. So to the best of my knowledge current patch is the 
> righteous one.

Let me restate my point again. It does not matter whether some application
uses the symbol. It does matter whether the symbol is considered the part
of exported stable ABI, intended for use by applications. If it is, then
FBSD_1.X is the right namespace, otherwise symbol should be moved to
private and existing usage fixed.


pgpUMOKO9KAex.pgp
Description: PGP signature


Re: Possible fix for Perl failing with ../lib/auto/POSIX/POSIX.so: Undefined symbol "__flt_rounds" on ARM

2012-06-12 Thread Jan Sieka

On 2012.06.12 10:49, Konstantin Belousov wrote:

On Tue, Jun 12, 2012 at 10:18:58AM +0200, Jan Sieka wrote:

On 2012.06.09 18:11, Tim Kientzle wrote:


On Jun 5, 2012, at 8:09 AM, Jan Sieka wrote:


Hello Ian!

I tried recently to compile and run Perl 5.12 on ARM (SheevaPlug) using
HEAD from 22.05.2012 and got the following error while trying to run:
/usr/ports/lang/perl5.12 # make test
[...]
../lib/auto/POSIX/POSIX.so: Undefined symbol "__flt_rounds
[...]

After investigating the issue it appeared that __flt_rounds symbol is
not exported by libc. Applying the following patch, recompilling world
and Perl fixed the problem and allowed to use Perl on SheevaPlug:

diff --git a/lib/libc/arm/Symbol.map b/lib/libc/arm/Symbol.map
index e8c7f1d..8cdcdaf 100644
--- a/lib/libc/arm/Symbol.map
+++ b/lib/libc/arm/Symbol.map
@@ -70,6 +70,7 @@ FBSDprivate_1.0 {
__divdf3;
__floatsisf;
__floatsidf;
+   __flt_rounds;
__fixsfsi;
__fixdfsi;
__fixunssfsi;

Can you comment whether this is a correct solution?


Great!  I had the same problem compiling Python last
week and had planned to track it down.

I just committed this to -CURRENT and will also
merge it to the armv6 tree.

Hello Tim!

Thanks for committing this but unfortunately that patch wasn't correct.
I had another discussion on freebsd-current@ (I forgot to do a
cross-list CC - now fixed) about how to add symbols to Symbols.map files
(see this thread:
http://lists.freebsd.org/pipermail/freebsd-current/2012-June/034511.html) and
from the answer and hints given by Konstantin Belousov I have prepared
another patch that adheres to library versioning guidelines. If nobody
objects this patch then feel free to commit it:

diff --git a/lib/libc/arm/Symbol.map b/lib/libc/arm/Symbol.map
index dc46013..48f6747 100644
--- a/lib/libc/arm/Symbol.map
+++ b/lib/libc/arm/Symbol.map
@@ -33,6 +33,10 @@ FBSD_1.0 {
 sbrk;
  };

+FBSD_1.3 {
+   __flt_rounds;
+};
+
  FBSDprivate_1.0 {
 /* PSEUDO syscalls */
 __sys_getlogin;

I have verified the above patch is working on SheevaPlug on FreeBSD
10-CURRENT from 2012-05-15 and Perl 5.12.4. Perl has to be recompiled
after applying this patch.

Well, both committed version and this version should work, the question
is which fix is right. Is __flt_rounds supposed to be linked to by
applications ? If the symbols are used by normal programs, that I think
we should indeed guarantee ABI stability for them, and FBSD_1.3
namespace is the right namespace to use.
Both versions work indeed. I have analysed other architectures' 
lib/libc//Symbol.map files and __flt_rounds should go into FBSD_ and *not* 
into FBSDprivate section. I have verified that at least one of the Perl's 
libraries (POSIX.so) links to __flt_rounds. Python also links to this function. 
So to the best of my knowledge current patch is the righteous one.


Best regards,

Jan Sieka

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Possible fix for Perl failing with ../lib/auto/POSIX/POSIX.so: Undefined symbol "__flt_rounds" on ARM

2012-06-12 Thread Konstantin Belousov
On Tue, Jun 12, 2012 at 10:18:58AM +0200, Jan Sieka wrote:
> On 2012.06.09 18:11, Tim Kientzle wrote:
> > 
> > On Jun 5, 2012, at 8:09 AM, Jan Sieka wrote:
> > 
> >> Hello Ian!
> >>
> >> I tried recently to compile and run Perl 5.12 on ARM (SheevaPlug) using
> >> HEAD from 22.05.2012 and got the following error while trying to run:
> >> /usr/ports/lang/perl5.12 # make test
> >> [...]
> >> ../lib/auto/POSIX/POSIX.so: Undefined symbol "__flt_rounds
> >> [...]
> >>
> >> After investigating the issue it appeared that __flt_rounds symbol is
> >> not exported by libc. Applying the following patch, recompilling world
> >> and Perl fixed the problem and allowed to use Perl on SheevaPlug:
> >>
> >> diff --git a/lib/libc/arm/Symbol.map b/lib/libc/arm/Symbol.map
> >> index e8c7f1d..8cdcdaf 100644
> >> --- a/lib/libc/arm/Symbol.map
> >> +++ b/lib/libc/arm/Symbol.map
> >> @@ -70,6 +70,7 @@ FBSDprivate_1.0 {
> >>__divdf3;
> >>__floatsisf;
> >>__floatsidf;
> >> +   __flt_rounds;
> >>__fixsfsi;
> >>__fixdfsi;
> >>__fixunssfsi;
> >>
> >> Can you comment whether this is a correct solution?
> > 
> > Great!  I had the same problem compiling Python last
> > week and had planned to track it down.
> > 
> > I just committed this to -CURRENT and will also
> > merge it to the armv6 tree.
> Hello Tim!
> 
> Thanks for committing this but unfortunately that patch wasn't correct.
> I had another discussion on freebsd-current@ (I forgot to do a
> cross-list CC - now fixed) about how to add symbols to Symbols.map files
> (see this thread:
> http://lists.freebsd.org/pipermail/freebsd-current/2012-June/034511.html) and
> from the answer and hints given by Konstantin Belousov I have prepared
> another patch that adheres to library versioning guidelines. If nobody
> objects this patch then feel free to commit it:
> 
> diff --git a/lib/libc/arm/Symbol.map b/lib/libc/arm/Symbol.map
> index dc46013..48f6747 100644
> --- a/lib/libc/arm/Symbol.map
> +++ b/lib/libc/arm/Symbol.map
> @@ -33,6 +33,10 @@ FBSD_1.0 {
> sbrk;
>  };
> 
> +FBSD_1.3 {
> +   __flt_rounds;
> +};
> +
>  FBSDprivate_1.0 {
> /* PSEUDO syscalls */
> __sys_getlogin;
> 
> I have verified the above patch is working on SheevaPlug on FreeBSD
> 10-CURRENT from 2012-05-15 and Perl 5.12.4. Perl has to be recompiled
> after applying this patch.
Well, both committed version and this version should work, the question
is which fix is right. Is __flt_rounds supposed to be linked to by
applications ? If the symbols are used by normal programs, that I think
we should indeed guarantee ABI stability for them, and FBSD_1.3
namespace is the right namespace to use.

I noted that the commit in question added the __flt_rounds symbol to the
existing group of symbols probably related to FPU handling. The same
question stands for that symbols too, is their placement into
FBSDprivate namespace right ?


pgpzH2kDKCCfd.pgp
Description: PGP signature


Re: Possible fix for Perl failing with ../lib/auto/POSIX/POSIX.so: Undefined symbol "__flt_rounds" on ARM

2012-06-12 Thread Jan Sieka
On 2012.06.09 18:11, Tim Kientzle wrote:
> 
> On Jun 5, 2012, at 8:09 AM, Jan Sieka wrote:
> 
>> Hello Ian!
>>
>> I tried recently to compile and run Perl 5.12 on ARM (SheevaPlug) using
>> HEAD from 22.05.2012 and got the following error while trying to run:
>> /usr/ports/lang/perl5.12 # make test
>> [...]
>> ../lib/auto/POSIX/POSIX.so: Undefined symbol "__flt_rounds
>> [...]
>>
>> After investigating the issue it appeared that __flt_rounds symbol is
>> not exported by libc. Applying the following patch, recompilling world
>> and Perl fixed the problem and allowed to use Perl on SheevaPlug:
>>
>> diff --git a/lib/libc/arm/Symbol.map b/lib/libc/arm/Symbol.map
>> index e8c7f1d..8cdcdaf 100644
>> --- a/lib/libc/arm/Symbol.map
>> +++ b/lib/libc/arm/Symbol.map
>> @@ -70,6 +70,7 @@ FBSDprivate_1.0 {
>>__divdf3;
>>__floatsisf;
>>__floatsidf;
>> +   __flt_rounds;
>>__fixsfsi;
>>__fixdfsi;
>>__fixunssfsi;
>>
>> Can you comment whether this is a correct solution?
> 
> Great!  I had the same problem compiling Python last
> week and had planned to track it down.
> 
> I just committed this to -CURRENT and will also
> merge it to the armv6 tree.
Hello Tim!

Thanks for committing this but unfortunately that patch wasn't correct.
I had another discussion on freebsd-current@ (I forgot to do a
cross-list CC - now fixed) about how to add symbols to Symbols.map files
(see this thread:
http://lists.freebsd.org/pipermail/freebsd-current/2012-June/034511.html) and
from the answer and hints given by Konstantin Belousov I have prepared
another patch that adheres to library versioning guidelines. If nobody
objects this patch then feel free to commit it:

diff --git a/lib/libc/arm/Symbol.map b/lib/libc/arm/Symbol.map
index dc46013..48f6747 100644
--- a/lib/libc/arm/Symbol.map
+++ b/lib/libc/arm/Symbol.map
@@ -33,6 +33,10 @@ FBSD_1.0 {
sbrk;
 };

+FBSD_1.3 {
+   __flt_rounds;
+};
+
 FBSDprivate_1.0 {
/* PSEUDO syscalls */
__sys_getlogin;

I have verified the above patch is working on SheevaPlug on FreeBSD
10-CURRENT from 2012-05-15 and Perl 5.12.4. Perl has to be recompiled
after applying this patch.

Best regards,

Jan Sieka
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"