GMP failure on Mac OS X 10.5

View: New views
7 Messages — Rating Filter:   Alert me  

GMP failure on Mac OS X 10.5

by Matt Fago :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I installed gcc 4.2.2 via ../gcc/configure; make; make install and  
then tried to install GMP 4.2.2 using this new compiler via ./
configure; make; make check

This results in the message:

make  check-TESTS
/bin/sh: line 1: 28320 Segmentation fault      ${dir}$tst
FAIL: t-bswap
PASS: t-constants
PASS: t-count_zeros
PASS: t-gmpmax
PASS: t-hightomask
PASS: t-modlinv
/bin/sh: line 1: 28431 Segmentation fault      ${dir}$tst
FAIL: t-popc
PASS: t-parity
PASS: t-sub
==================================
2 of 9 tests failed
Please report to gmp-bugs@...
==================================


Note that I get the following errors at the end of the build:

ranlib: file: .libs/libgmp.a(mp_clz_tab.o) has no symbols
ranlib: file: .libs/libgmp.a(obprintf.o) has no symbols
ranlib: file: .libs/libgmp.a(obvprintf.o) has no symbols
ranlib: file: .libs/libgmp.a(obprntffuns.o) has no symbols
ranlib: file: .libs/libgmp.a(repl-vsnprintf.o) has no symbols
ranlib .libs/libgmp.a
ranlib: file: .libs/libgmp.a(mp_clz_tab.o) has no symbols
ranlib: file: .libs/libgmp.a(obprintf.o) has no symbols
ranlib: file: .libs/libgmp.a(obvprintf.o) has no symbols
ranlib: file: .libs/libgmp.a(obprntffuns.o) has no symbols
ranlib: file: .libs/libgmp.a(repl-vsnprintf.o) has no symbols
rm -fr .libs/libgmp.lax
creating libgmp.la


Also note that I have GMP version 4.1.4 installed from a previous  
installation of gcc.


Additionally, the ./configure script set -march=k8, even though the  
appropriate value would be -march=nocona. Did not change the test  
failure of course, but not ideal on this platform?


Building with Apple's supplied gcc [gcc version 4.0.1 (Apple Inc.  
build 5465)], still gives the ranlib messages above, but the checks  
all pass.

Probably a known issue, but I thought I'd report them just in case.

Thanks,
Matt
_______________________________________________
gmp-bugs mailing list
gmp-bugs@...
http://swox.com/mailman/listinfo/gmp-bugs

Re: GMP failure on Mac OS X 10.5

by Torbjorn Granlund-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Matt Fago <fago@...> writes:

  I installed gcc 4.2.2 via ../gcc/configure; make; make install and  
  then tried to install GMP 4.2.2 using this new compiler via ./
  configure; make; make check
 
  This results in the message:
 
  make  check-TESTS
  /bin/sh: line 1: 28320 Segmentation fault      ${dir}$tst
  FAIL: t-bswap
  PASS: t-constants
  PASS: t-count_zeros
  PASS: t-gmpmax
  PASS: t-hightomask
  PASS: t-modlinv
  /bin/sh: line 1: 28431 Segmentation fault      ${dir}$tst
  FAIL: t-popc
  PASS: t-parity
  PASS: t-sub
  ==================================
  2 of 9 tests failed
  Please report to gmp-bugs@...
  ==================================
 
I am using gcc 4.2.2 on non-apple systems with a core 2 processor, and
there are no problems there.
 
  Additionally, the ./configure script set -march=k8, even though the  
  appropriate value would be -march=nocona. Did not change the test  
  failure of course, but not ideal on this platform?
 
Maybe, maybe not.  Apple never user any nocona (aka 64-bit Pentium 4)
processor.
 
  Building with Apple's supplied gcc [gcc version 4.0.1 (Apple Inc.  
  build 5465)], still gives the ranlib messages above, but the checks  
  all pass.

Really?  Usually Apple's gcc releases miscompile gmp and just about
everything else.

--
Torbjörn
_______________________________________________
gmp-bugs mailing list
gmp-bugs@...
http://swox.com/mailman/listinfo/gmp-bugs

Re: GMP failure on Mac OS X 10.5

by Torbjorn Granlund-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Matt Fago <fago@...> writes:

  I installed gcc 4.2.2 via ../gcc/configure; make; make install and  
  then tried to install GMP 4.2.2 using this new compiler via ./
  configure; make; make check

  This results in the message:

  make  check-TESTS
  /bin/sh: line 1: 28320 Segmentation fault      ${dir}$tst
  FAIL: t-bswap
  PASS: t-constants
  PASS: t-count_zeros
  PASS: t-gmpmax
  PASS: t-hightomask
  PASS: t-modlinv
  /bin/sh: line 1: 28431 Segmentation fault      ${dir}$tst
  FAIL: t-popc
  PASS: t-parity
  PASS: t-sub
  ==================================
  2 of 9 tests failed
  Please report to gmp-bugs@...
  ==================================
   
I got gcc 4.2.2 built on the Mac system, and could look reproduce the
problem.

The problem is that the FSF gcc (as opposed to the Apple hacked gcc)
does not align the stack at 16-byte boundaries.  The problematic
function is __gmp_randget_mt (from randmt.c), the stack is aligned 8
mod 16 at entry (as it should), then six 8-byte pushes are made, still
leaving the stack 8 mod 16 aligned.  For the calls later in the
function (to the dynamic loader and to __gmp_mt_recalc_buffer) the
stack will be aligned 0 mod 16 at function entry, which is wrong.

The dynamic loader executes a bunch of movdqa instructions with an
offset that is 8 mod 16 relative to the stack, which causes the
SIGSEGV signals sicne the stack is now incorrectly 0 mod 16 aligned.
(These instructions require 16-bit alignment.)

I haven't seen any ABI document for the x86_64 Mac, but the ELF ABI
(used for *BSD, GNU/Linux, Solaris) mandates 8 mod 16 alignment at
function entry.

I looked at some code generated on FreebSD, and it seems the FSF gcc
deviates from the ELF ABI stack alignment requirements there, but
luckily currently this does not trigger any problems.

No GMP bug, workaround within GMP impossible.

--
Torbjörn
_______________________________________________
gmp-bugs mailing list
gmp-bugs@...
http://swox.com/mailman/listinfo/gmp-bugs

Re: GMP failure on Mac OS X 10.5

by mnostrich :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Matt,

Did you figure this problem? I am experiencing the same... THanks.
Matt Fago wrote:
I installed gcc 4.2.2 via ../gcc/configure; make; make install and  
then tried to install GMP 4.2.2 using this new compiler via ./
configure; make; make check

This results in the message:

make  check-TESTS
/bin/sh: line 1: 28320 Segmentation fault      ${dir}$tst
FAIL: t-bswap
PASS: t-constants
PASS: t-count_zeros
PASS: t-gmpmax
PASS: t-hightomask
PASS: t-modlinv
/bin/sh: line 1: 28431 Segmentation fault      ${dir}$tst
FAIL: t-popc
PASS: t-parity
PASS: t-sub
==================================
2 of 9 tests failed
Please report to gmp-bugs@swox.com
==================================


Note that I get the following errors at the end of the build:

ranlib: file: .libs/libgmp.a(mp_clz_tab.o) has no symbols
ranlib: file: .libs/libgmp.a(obprintf.o) has no symbols
ranlib: file: .libs/libgmp.a(obvprintf.o) has no symbols
ranlib: file: .libs/libgmp.a(obprntffuns.o) has no symbols
ranlib: file: .libs/libgmp.a(repl-vsnprintf.o) has no symbols
ranlib .libs/libgmp.a
ranlib: file: .libs/libgmp.a(mp_clz_tab.o) has no symbols
ranlib: file: .libs/libgmp.a(obprintf.o) has no symbols
ranlib: file: .libs/libgmp.a(obvprintf.o) has no symbols
ranlib: file: .libs/libgmp.a(obprntffuns.o) has no symbols
ranlib: file: .libs/libgmp.a(repl-vsnprintf.o) has no symbols
rm -fr .libs/libgmp.lax
creating libgmp.la


Also note that I have GMP version 4.1.4 installed from a previous  
installation of gcc.


Additionally, the ./configure script set -march=k8, even though the  
appropriate value would be -march=nocona. Did not change the test  
failure of course, but not ideal on this platform?


Building with Apple's supplied gcc [gcc version 4.0.1 (Apple Inc.  
build 5465)], still gives the ranlib messages above, but the checks  
all pass.

Probably a known issue, but I thought I'd report them just in case.

Thanks,
Matt
_______________________________________________
gmp-bugs mailing list
gmp-bugs@swox.com
http://swox.com/mailman/listinfo/gmp-bugs

Re: GMP failure on Mac OS X 10.5

by cheongi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have just downloaded and installed gmp 4.2.3 on os 10.5.4 intel Xcode 3.1.

Everything seemed to work fine. Make check reports all is well. Compilier finds the GMP libraries.

Only errors on compiling GMP were:
ranlib: file: .libs/libprintf.a(obprintf.o) has no symbols
ranlib: file: .libs/libprintf.a(obvprintf.o) has no symbols
ranlib: file: .libs/libprintf.a(obprntffuns.o) has no symbols
ranlib: file: .libs/libprintf.a(repl-vsnprintf.o) has no symbols
ranlib .libs/libprintf.a
ranlib: file: .libs/libprintf.a(obprintf.o) has no symbols
ranlib: file: .libs/libprintf.a(obvprintf.o) has no symbols
ranlib: file: .libs/libprintf.a(obprntffuns.o) has no symbols
ranlib: file: .libs/libprintf.a(repl-vsnprintf.o) has no symbols

ranlib: file: .libs/libgmp.a(mp_clz_tab.o) has no symbols
ranlib: file: .libs/libgmp.a(obprintf.o) has no symbols
ranlib: file: .libs/libgmp.a(obvprintf.o) has no symbols
ranlib: file: .libs/libgmp.a(obprntffuns.o) has no symbols
ranlib: file: .libs/libgmp.a(repl-vsnprintf.o) has no symbols
ranlib .libs/libgmp.a
ranlib: file: .libs/libgmp.a(mp_clz_tab.o) has no symbols
ranlib: file: .libs/libgmp.a(obprintf.o) has no symbols
ranlib: file: .libs/libgmp.a(obvprintf.o) has no symbols
ranlib: file: .libs/libgmp.a(obprntffuns.o) has no symbols
ranlib: file: .libs/libgmp.a(repl-vsnprintf.o) has no symbols

ranlib: file: /usr/local/lib/libgmp.a(mp_clz_tab.o) has no symbols
ranlib: file: /usr/local/lib/libgmp.a(obprintf.o) has no symbols
ranlib: file: /usr/local/lib/libgmp.a(obvprintf.o) has no symbols
ranlib: file: /usr/local/lib/libgmp.a(obprntffuns.o) has no symbols
ranlib: file: /usr/local/lib/libgmp.a(repl-vsnprintf.o) has no symbols


Re: GMP failure on Mac OS X 10.5

by Ryan Schmidt-48 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

And what is the problem you are experiencing?


On Aug 10, 2008, at 19:33, cheongi wrote:

> I have just downloaded and installed gmp 4.2.3 on os 10.5.4 intel  
> Xcode 3.1.
>
> Everything seemed to work fine. Make check reports all is well.  
> Compilier
> finds the GMP libraries.
>
> Only errors on compiling GMP were:
> ranlib: file: .libs/libprintf.a(obprintf.o) has no symbols
> ranlib: file: .libs/libprintf.a(obvprintf.o) has no symbols
> ranlib: file: .libs/libprintf.a(obprntffuns.o) has no symbols
> ranlib: file: .libs/libprintf.a(repl-vsnprintf.o) has no symbols
> ranlib .libs/libprintf.a
> ranlib: file: .libs/libprintf.a(obprintf.o) has no symbols
> ranlib: file: .libs/libprintf.a(obvprintf.o) has no symbols
> ranlib: file: .libs/libprintf.a(obprntffuns.o) has no symbols
> ranlib: file: .libs/libprintf.a(repl-vsnprintf.o) has no symbols
>
> ranlib: file: .libs/libgmp.a(mp_clz_tab.o) has no symbols
> ranlib: file: .libs/libgmp.a(obprintf.o) has no symbols
> ranlib: file: .libs/libgmp.a(obvprintf.o) has no symbols
> ranlib: file: .libs/libgmp.a(obprntffuns.o) has no symbols
> ranlib: file: .libs/libgmp.a(repl-vsnprintf.o) has no symbols
> ranlib .libs/libgmp.a
> ranlib: file: .libs/libgmp.a(mp_clz_tab.o) has no symbols
> ranlib: file: .libs/libgmp.a(obprintf.o) has no symbols
> ranlib: file: .libs/libgmp.a(obvprintf.o) has no symbols
> ranlib: file: .libs/libgmp.a(obprntffuns.o) has no symbols
> ranlib: file: .libs/libgmp.a(repl-vsnprintf.o) has no symbols
>
> ranlib: file: /usr/local/lib/libgmp.a(mp_clz_tab.o) has no symbols
> ranlib: file: /usr/local/lib/libgmp.a(obprintf.o) has no symbols
> ranlib: file: /usr/local/lib/libgmp.a(obvprintf.o) has no symbols
> ranlib: file: /usr/local/lib/libgmp.a(obprntffuns.o) has no symbols
> ranlib: file: /usr/local/lib/libgmp.a(repl-vsnprintf.o) has no symbols


_______________________________________________
gmp-bugs mailing list
gmp-bugs@...
http://swox.com/mailman/listinfo/gmp-bugs

Re: GMP failure on Mac OS X 10.5

by cheongi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Ryan Schmidt-48 wrote:
And what is the problem you are experiencing?
No problems noticed. Just wondering if the missing symbols are relevant or not.


LightInTheBox - Buy quality products at wholesale price!