compiling fails

351 views
Skip to first unread message

mor...@math.fu-berlin.de

unread,
Jan 6, 2017, 4:52:02 AM1/6/17
to mpir-devel
When trying to compile mpir-7.2.2 on my 4.8.0-2-amd64 #1 SMP Debian 4.8.11-1 (2016-12-02) x86_64 GNU/Linux -System, I get the following error during make:

ar: `u' modifier ignored since `D' is the default (see `U')

mpn/.libs/preinv_divrem_1.o: In function `__gmpn_preinv_divrem_1':
preinv_divrem_1.c:(.text+0x0): multiple definition of `__gmpn_preinv_divrem_1'
mpn/.libs/divrem_euclidean_qr_1.o:divrem_euclidean_qr_1.as:(.text+0x0): first defined here
mpn/.libs/addmul_2.o: In function `__gmpn_addmul_2':
addmul_2.as:(.text+0x0): multiple definition of `__gmpn_addmul_2'
mpn/.libs/redc_2.o:redc_2.c:(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [libmpir.la] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2


The configure step before that seems to run fine.
(it only gives a bunch of
"sed: character class syntax is [[:space:]], not [:space:]"-errors

If you want I would gladly post the output of both the configure and the make command.

So far I tried to compile with different versions of gcc (namely gcc-6, gcc-5 and gcc-4.9), but none worked. I don't quite understand what is going on.
I am actually trying to compile sage, and this hangs when compiling mpir; hence I was tying to compile the version downloaded from the mpir-website, which gives the same error.

Bill Hart

unread,
Jan 6, 2017, 4:59:22 AM1/6/17
to mpir-devel
Unfortunately I don't know what the issue is here. Usually when something like that happens, I download a fresh copy of MPIR from the website and try again. If it still doesn't work, check that there is nothing in the environment or .bashrc, etc., that might be interfering with gcc.

If it still comes up short, there must be an issue with the Debian you are using. Obviously MPIR is compiled on many Linux systems all the time without trouble.

You could try

autoreconf -fiv --no-recursive

to see if the latest autotools fixes the issue. But first you must make copies of config.guess and config.sub since autoreconf borks them.

Another thing to check is that you don't have some bizarre unsupported architecture. What does ./config.guess report?

Sorry I can't be of more help.

Bill.


--
You received this message because you are subscribed to the Google Groups "mpir-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mpir-devel+unsubscribe@googlegroups.com.
To post to this group, send email to mpir-...@googlegroups.com.
Visit this group at https://groups.google.com/group/mpir-devel.
For more options, visit https://groups.google.com/d/optout.

mor...@math.fu-berlin.de

unread,
Jan 6, 2017, 5:48:27 AM1/6/17
to mpir-devel

Thanks a lot for the very quick reply! I have compiled it many times before, always without trouble.
Downloading a fresh copy did not help. I did try, however the next older version, 2.6.0 on the website and this compiled successfully!

the autoreconv suggestion did not prove to be useful.

I don't think I have a bizarre architecture its a standard thinkpad x240 with Intel processor; ./config.guess reports
haswell-unknown-linux-gnu

Maybe this already the problem; in the folder of the version 2.6.0 ./config.guess reports:
x86_64-unknown-linux-gnu, which is what it should be.

Bill Hart

unread,
Jan 6, 2017, 5:53:32 AM1/6/17
to mpir-devel
On 6 January 2017 at 11:48, <mor...@math.fu-berlin.de> wrote:

Thanks a lot for the very quick reply! I have compiled it many times before, always without trouble.
Downloading a fresh copy did not help. I did try, however the next older version, 2.6.0 on the website and this compiled successfully!

the autoreconv suggestion did not prove to be useful.

I don't think I have a bizarre architecture its a standard thinkpad x240 with Intel processor; ./config.guess reports
haswell-unknown-linux-gnu

This is correct.
 

Maybe this already the problem; in the folder of the version 2.6.0 ./config.guess reports:
x86_64-unknown-linux-gnu, which is what it should be.

This is incorrect. It suggests config.guess or config.sub is borked. Did you save a copy of both before running autoreconf?

Bill. 

mor...@math.fu-berlin.de

unread,
Jan 7, 2017, 8:11:59 AM1/7/17
to mpir-devel
thanks again for the fast reply! I have tried a bit more, but couldn't get it to work.
 

Maybe this already the problem; in the folder of the version 2.6.0 ./config.guess reports:
x86_64-unknown-linux-gnu, which is what it should be.

 Did you save a copy of both before running autoreconf?

I did save a copy of ./config.guess and config.sub and recopied them after running
autoreconf -fiv --no-recursive but it didn't solve the problem; when running make I get the same error message.

Notice that ./config.guess is only reporting x86_64-unknown-linux-gnu in the folder when I compile the *old* version 2.6.0, which works. In the folder of 2.7.2 its  "haswell-unknown-linux-gnu", which you say is as it should be.

I am not sure what else to do. I run debian sid and tried installing older versions of gcc, but it didn't help.
From the error message I it sounds like some other installation of gmp might cause the problem?!

Bill Hart

unread,
Jan 7, 2017, 12:34:02 PM1/7/17
to mpir-devel
On 7 January 2017 at 14:11, <mor...@math.fu-berlin.de> wrote:
thanks again for the fast reply! I have tried a bit more, but couldn't get it to work.
 

Maybe this already the problem; in the folder of the version 2.6.0 ./config.guess reports:
x86_64-unknown-linux-gnu, which is what it should be.

 Did you save a copy of both before running autoreconf?

I did save a copy of ./config.guess and config.sub and recopied them after running
autoreconf -fiv --no-recursive but it didn't solve the problem; when running make I get the same error message.

Notice that ./config.guess is only reporting x86_64-unknown-linux-gnu in the folder when I compile the *old* version 2.6.0, which works. In the folder of 2.7.2 its  "haswell-unknown-linux-gnu", which you say is as it should be.


That sounds right. Probably 2.6.0 didn't directly support Haswell, so it knocks back to some default x86_64.
 
I am not sure what else to do. I run debian sid and tried installing older versions of gcc, but it didn't help.
From the error message I it sounds like some other installation of gmp might cause the problem?

I can't even think what else to suggest. It sounds like you need a debian expert with physical access to a similar setup.

Two last ditch things to try. Pass ABI=64 to configure and see if that changes anything. Secondly, post up your config.log and we'll see if anything looks out of the ordinary. I doubt either will help, since it sounds like a debian toolchain issue to me. But you never know.

Bill. 

mor...@math.fu-berlin.de

unread,
Jan 7, 2017, 3:39:40 PM1/7/17
to mpir-devel
Passing ABI=64 did not work. I attach my config.log

Might the information regarding missing versions of automake-1.14, aclocal-1.14, etc. be the problem? I have versions 1.15 installed...

Thanks a lot for taking the time to look at my troubles with compiling..

Moritz
config.log

Bill Hart

unread,
Jan 8, 2017, 3:47:40 AM1/8/17
to mpir-devel
I had a look through the config.log and didn't spot anything questionable. MPIR certainly compiles on my Haswell, so I'm really short on explanations.

I don't think the automake etc is relevant.

Maybe somehow the recent debian hardening is related to this issue. But I understand nothing of this. I think some debian expert is going to have to sort this out, unfortunately.

Bill.

--

mor...@math.fu-berlin.de

unread,
Jan 9, 2017, 7:49:44 AM1/9/17
to mpir-devel
thanks for the help! Unfortunately I still couldn't solve my problem..

mor...@math.fu-berlin.de

unread,
Jan 10, 2017, 4:41:15 PM1/10/17
to mpir-devel
With the help of the sage mailing list, (https://groups.google.com/forum/#!topic/sage-devel/sqXwBseqiRA) I now know what the problem was:
the new version 4.3-3 of sed. A downgrade to version 4.2.2-8 made compilation possible again!

I guess I sholud have payed more attention to the
"sed: character class syntax is [[:space:]], not [:space:]"-errors that I mention already in the first post..

In any case, when more people upgrade to newer versions of sed, this wil become a problem; so I hope my bug report is useful...

Thank you again, Bill, for the immediate answers to my questions!

Bill Hart

unread,
Jan 10, 2017, 5:20:42 PM1/10/17
to mpir-devel
Thanks for confirming this. I did see it pop up on the sage list.

--

Tommy Hofmann

unread,
Jan 12, 2017, 8:00:56 AM1/12/17
to mpir-devel
Can you change [:space] to [[:space]] in line 24304 of the configure file and try again?

mor...@math.fu-berlin.de

unread,
Jan 12, 2017, 12:29:34 PM1/12/17
to mpir-devel


Can you change [:space] to [[:space]] in line 24304 of the configure file and try again?

This worked! Thanks Tommy! I prepared a pull request for this minor change:
https://github.com/wbhart/mpir/pull/184

Best regards
 Moritz

Tommy Hofmann

unread,
Jan 13, 2017, 2:24:05 AM1/13/17
to mpir-devel
Just a shot in the dark. I am glad it worked.
Reply all
Reply to author
Forward
0 new messages