Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#40736 - [julia] julia is built for a specific CPU

Attached to Project: Community Packages
Opened by Sami B. (spider-mario) - Friday, 06 June 2014, 17:06 GMT
Last edited by Alexander F. Rødseth (xyproto) - Thursday, 03 July 2014, 14:31 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Alexander F. Rødseth (xyproto)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Julia appears to be built with an equivalent of -march=native by default.

(This can be seen in Make.inc in its source code:

# Select the cpu architecture to target
# Current available options are "native" and "core2"
JULIA_CPU_TARGET = native

)

As a result, the package in [community] doesn’t work on all CPUs. For example, trying to run it on my machine results in:

$ julia
Illegal instruction (core dumped)

It works if I rebuild the package with JULIA_CPU_TARGET = core2. (For some reason, it fails with `native` with another SIGILL…)
This task depends upon

Closed by  Alexander F. Rødseth (xyproto)
Thursday, 03 July 2014, 14:31 GMT
Reason for closing:  Fixed
Comment by Doug Newgard (Scimmia) - Friday, 06 June 2014, 17:11 GMT
What is your CPU?
Comment by Sami B. (spider-mario) - Friday, 06 June 2014, 17:13 GMT
Here is the output of cpuinfo.
Comment by Sami B. (spider-mario) - Friday, 06 June 2014, 17:14 GMT
And here is the output of lshw -c cpu:

*-cpu
description: CPU
product: Pentium(R) Dual-Core CPU T4200 @ 2.00GHz
vendor: Intel Corp.
physical id: 4
bus info: cpu@0
version: CPU Version
slot: U2E1
size: 1600MHz
capacity: 2GHz
width: 64 bits
clock: 200MHz
capabilities: x86-64 fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm xsave lahf_lm dtherm cpufreq
configuration: cores=2 enabledcores=2 threads=2
Comment by Alexander F. Rødseth (xyproto) - Tuesday, 10 June 2014, 19:29 GMT
Hi,

Thanks for reporting. This is unfortunate. I'll try rebuilding with different JULIA_CPU_TARGET settings for i686 and x86_64.
Comment by Alexander F. Rødseth (xyproto) - Tuesday, 10 June 2014, 20:36 GMT
Rebuilding the package with JULIA_CPU_TARGET=core2 for x86_64.
Comment by Daniel Micay (thestinger) - Tuesday, 10 June 2014, 20:44 GMT
core2 isn't the x86_64 baseline, it has instructions not present on earlier CPUs
Comment by Alexander F. Rødseth (xyproto) - Friday, 13 June 2014, 21:22 GMT
Updated the package. It will appear in [community] shortly. I fully agree that using core2 is not a solution to this problem.

Suggestions for other/better workarounds are welcome. If there are none, this should be reported upstream (if it hasn't already). Thanks.
Comment by Daniel Micay (thestinger) - Friday, 13 June 2014, 21:40 GMT
JULIA_CPU_TARGET=x86_64 doesn't work?
Comment by Alexander F. Rødseth (xyproto) - Friday, 13 June 2014, 21:57 GMT
Make.inc specifically states that "native" and "core2" are the only two allowed choices, but I can try.
Comment by Alexander F. Rødseth (xyproto) - Friday, 13 June 2014, 21:59 GMT
Nope, JULIA_CPU_TARGET=x86_64 doesn't work:

make: Entering directory '/build/julia/src/julia'
/build/julia/src/julia/Make.inc:269: *** Unknown cpu target architecture. Stop.
make: Leaving directory '/build/julia/src/julia'
Comment by Alexander F. Rødseth (xyproto) - Sunday, 22 June 2014, 19:44 GMT
If the latest build for core2 solves the problem for everyone involved here, I suggest that we close this bug and report further problem in this regard upstream to the Julia developers.
Comment by Sami B. (spider-mario) - Sunday, 22 June 2014, 22:23 GMT
It indeed solves the problem for me.

Wouldn’t it by any chance fix #39721 as well, thus making it possible to keep sys.so?

Also, https://github.com/JuliaLang/julia/pull/7103 might be relevant.
Comment by Alexander F. Rødseth (xyproto) - Saturday, 28 June 2014, 09:24 GMT
Good question, I'll look into it. Issue 7103 does look relevant. Hopefully Julia will provide a more streamlined build and installation procedure in the future.
Comment by Alexander F. Rødseth (xyproto) - Thursday, 03 July 2014, 13:45 GMT
Re-opened  FS#39721  to look into the sys.so problem. Closing this bug, as it seems to be fixed. Please re-open if this is still an issue for anyone.

Loading...