Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 378645 - dev-perl/Math-Pari ignores ARCH / CFLAGS / ? and fails when compiling x86 userland on amd64 kernel
Summary: dev-perl/Math-Pari ignores ARCH / CFLAGS / ? and fails when compiling x86 use...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo Perl team
URL:
Whiteboard: special upstream
Keywords:
Depends on:
Blocks: cflags perlxsflags
  Show dependency tree
 
Reported: 2011-08-10 12:18 UTC by Saverio Pangoli
Modified: 2021-05-19 16:36 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Saverio Pangoli 2011-08-10 12:18:11 UTC
Emerging dev-perl/math-pari fails when compiling on a x86_64 system for a x86 target. This is because the configure script ignores profiles, and 'autodetects' x86_64 platform. 

I haven't found a way to turn it off..

This is my profile; I am building a binary for my geode box:

# profile-config show
Current /etc/make.profile symlink:
  default/linux/x86/10.0    

emerge sci-mathematics/pari gives this:

>>> Emerging (1 of 91) dev-perl/math-pari-2.01080604
openpty failed: 'out of pty devices'
 * Math-Pari-2.01080604.tar.gz RMD160 SHA1 SHA256 size ;-) ...           [ ok ]
 * pari-2.3.4.tar.gz RMD160 SHA1 SHA256 size ;-) ...                     [ ok ]
 * Package:    dev-perl/math-pari-2.01080604
 * Repository: gentoo
 * Maintainer: perl@gentoo.org
 * USE:        elibc_glibc kernel_linux userland_GNU x86
 * FEATURES:   sandbox
...
Creating libPARI/paricfg.h...
...Processor of family `x86_64' detected
Checking if your kit is complete...
Looks good
...Processor of family `x86_64' detected
...I will use assembler build of type 'x86_64'. <---------- Ugh!!
...Assembler is GNU assembler

.. and after a bit of course everything goes pear-shaped..

../src/kernel/none/level1.h: Assembler messages:
../src/kernel/none/level1.h:1087: Error: suffix or operands invalid for `mul'
../src/kernel/none/level1.h:1088: Error: suffix or operands invalid for `div'
../src/kernel/none/level1.h:1087: Error: suffix or operands invalid for `mul'
../src/kernel/none/level1.h:1088: Error: suffix or operands invalid for `div'




Reproducible: Always

Steps to Reproduce:
1. try to compile dev-perl/math-pari on a 64-bit processor, for a 32-bit system.
Actual Results:  
assembler errors due to wrong architecture

Expected Results:  
the assembler should honor the profile and use x86 instructions.

dev-perl/math-pari-2.01080604 on a 32-bit chroot, with a 64-bit running kernel
2.6.38-10-generic  x86_64 Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz GenuineIntel
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2011-08-13 14:30:14 UTC
Setting a profile does not magically change everything, especially when the make.conf you use is not adapted for that profile but instead overrides critical variables like CHOST.
Comment 2 Saverio Pangoli 2011-08-13 15:14:27 UTC
Here is what is in my make.conf:


CHOST="i586-pc-linux-gnu"
CFLAGS="-march=geode -Os -fno-align-jumps -fno-align-functions -fno-align-labels -fno-align-loops -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j7"
Comment 3 Saverio Pangoli 2011-08-18 16:18:45 UTC
Jeroen,

For what I see CHOST has been set correctly to "i586-pc-linux-gnu", and the issue seems to be the pari ebuild 'autodetecting' that is in fact running on a x86_64 architecture.

I re-opened the bug and changed the status to 'unconfirmed'; if you feel it should be closed, please tell me how I can get this to build.

Setting the variables as per the embedded handbook worked for most packages, but not this one - looks like an actual problem.

Saverio
Comment 4 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2013-07-27 16:20:39 UTC
Not a bug, problem in your settings. I  can't reproduce it.
Comment 5 Andreas K. Hüttel archtester gentoo-dev 2015-07-15 21:53:42 UTC
Happens on woodpecker (amd64 kernel, x86 userland).
Comment 6 Stuart Shelton 2016-02-06 13:29:25 UTC
I have a system that I'm in the process of migrating from x86 (Pentium-4) to x86_64 (Xeon), due to hardware failure of the original host.

This is currently a 64-bit kernel with a 32-bit userland, and CHOST still set to 'i686-pc-linux-gnu'.

So far as I can tell, this is reasonable and valid.

However, as above, math-pari "detects" an x86_64 system and then fails to compile.

Might this be an issue for x32 user-spaces also?

I've fixed this by running "sudo linux32 emerge -v math-pari", which appears to work - but this obviously isn't ideal...