Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build latest Julia #7240

Closed
milktrader opened this issue Jun 13, 2014 · 20 comments
Closed

Cannot build latest Julia #7240

milktrader opened this issue Jun 13, 2014 · 20 comments

Comments

@milktrader
Copy link
Contributor

[julia (master)]
✈  make
f951: error: unrecognized command line option "-frecursive"
f951: error: unrecognized command line option "-frecursive"
make[5]: *** [sgbcon.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[5]: *** [sgbbrd.o] Error 1
make[4]: *** [lapacklib] Error 2
make[3]: *** [netlib] Error 2
*** Clean the OpenBLAS build with 'make -C deps clean-openblas'. Rebuild with 'make OPENBLAS_USE_THREAD=0 if OpenBLAS had trouble linking libpthread.so, and
 with 'make OPENBLAS_TARGET_ARCH=NEHALEM' if there were errors building SandyBridge support. Both these options can also be used simultaneously. ***
make[2]: *** [openblas-v0.2.9/libopenblas.dylib] Error 1
make[1]: *** [julia-release] Error 2
make: *** [release] Error 2

Commit:

8293dc614cb34847389bf8efca9fc1d4c201c6d6 Remove -lz from OSLIBS. Should be handled automatically by llvm-config in src/Makefile
@milktrader
Copy link
Contributor Author

I tried 'make -C deps clean-openblas followed by make OPENBLAS_USE_THREAD=0 (which errored out) and then again with make OPENBLAS_TARGET_ARCH=NEHALEM which also errored out.

@milktrader
Copy link
Contributor Author

I did get this to compile with echo override USE_SYSTEM_BLAS = 1 >> Make.user cc @vtjnash

@davidanthoff
Copy link
Contributor

Same here, was able to compile yesterday, now get the same error message as @milktrader. On Windows using msys2 setup.

@ViralBShah
Copy link
Member

What is your gfortran version?

@davidanthoff
Copy link
Contributor

$ gfortran --version
GNU Fortran (rev5, Built by MinGW-W64 project) 4.8.1
Copyright (C) 2013 Free Software Foundation, Inc.

I just followed the instructions README.windows.md to set everything up, including mingw-builds.

@davidanthoff
Copy link
Contributor

Actually, I get a different error message than @milktrader:

../libopenblasp-r0.2.9.a(sgesvd.o):sgesvd.f:(.text+0x40e): undefined reference to `_gfortran_concat_string'
../libopenblasp-r0.2.9.a(sgesvd.o):sgesvd.f:(.text+0xe7d): undefined reference to `_gfortran_concat_string'
c:/mingw-builds/x64-4.8.1-win32-seh-rev5/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: ../libopenblasp-r0.2.9.a(sgesvd.o): bad reloc address 0x0 in section `.pdata'
collect2.exe: error: ld returned 1 exit status
Makefile:85: recipe for target '../libopenblas.dll' failed
make[4]: *** [../libopenblas.dll] Error 1
Makefile:100: recipe for target 'shared' failed
make[3]: *** [shared] Error 2
*** Clean the OpenBLAS build with 'make -C deps clean-openblas'. Rebuild with 'make OPENBLAS_USE_THREAD=0 if OpenBLAS had trouble linking libpthread.so, and with 'make OPENBLAS_TARGET_ARCH=NEHALEM' if there were errors building SandyBridge support. Both these options can also be used simultaneously. ***
Makefile:804: recipe for target 'openblas-v0.2.9/libopenblas.dll' failed
make[2]: *** [openblas-v0.2.9/libopenblas.dll] Error 1
Makefile:43: recipe for target 'julia-release' failed
make[1]: *** [julia-release] Error 2
Makefile:32: recipe for target 'release' failed
make: *** [release] Error 2

@Luthaf
Copy link
Contributor

Luthaf commented Jun 13, 2014

I get a slightly different error message, but it seems to be related to OpenBLAS too.

The traceback is pretty long, so I putted it here

My gfortran version, in the case it may be interesting:

$ gfortran --version
GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)
Copyright (C) 2010 Free Software Foundation, Inc.

@milktrader
Copy link
Contributor Author

✈  gfortran --version
GNU Fortran (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
Copyright (C) 2007 Free Software Foundation, Inc.

@stevengj
Copy link
Member

The -frecursive option seems to have been added in gfortran 4.3.x.

@davidanthoff
Copy link
Contributor

Skimming the logs posted here, it actually looks like the build breaks for three different reasons for @milktrader, @Luthaf and me... I'm starting a fresh clean build off master on my machine now and will post the full log once it is done.

@davidanthoff
Copy link
Contributor

I'm preparing a PR that fixes my issue.

@milktrader
Copy link
Contributor Author

I'll try the gfortran update route, but it appears brew has bundled it with gcc

@milktrader
Copy link
Contributor Author

I commented out the Make.user override USE_SYSTEM_BLAS = 1 trick and the compile worked with a brew gcc, but when I try to get a version for my gfortran I get this:

✈  gfortran --version
gfortran: error trying to exec '/usr/local/bin/../Cellar/gcc/4.8.3_1/bin/i686-apple-darwin11-gfortran-4.2.1': execvp: No such file or directory

Is that because gfortran is bundled with gcc now? In any case, I'll close this issue since it seems resolved with updating gfortran

@tkelman
Copy link
Contributor

tkelman commented Jun 14, 2014

@Luthaf do you have a Haswell processor? I saw the same problem you did with Error: no such instruction: vpermpd in the Haswell kernels, and was able to work around it by putting override OPENBLAS_DYNAMIC_ARCH=0 in my Make.user.

@Luthaf
Copy link
Contributor

Luthaf commented Jun 14, 2014

@Luthaf do you have a Haswell processor? I saw the same problem you did with Error: no such instruction: vpermpd in the Haswell kernels, and was able to work around it by putting override OPENBLAS_DYNAMIC_ARCH=0 in my Make.user.

I don't know. I'll check this on Monday. But I have already managed to build Julia every week for the two last months.

@Luthaf
Copy link
Contributor

Luthaf commented Jun 16, 2014

@Luthaf do you have a Haswell processor?

No, it is a Core2 Duo. cat /proc/cpuinfo gives me Intel(R) Core(TM)2 Duo CPU E6750 @ 2.66GHz.

A fully fresh buil :

git clone https://github.com/JuliaLang/julia julia
cd julia
make

produces the same error.

@tkelman
Copy link
Contributor

tkelman commented Jun 16, 2014

Try

echo "OPENBLAS_DYNAMIC_ARCH=0" > Make.user
make

@Luthaf
Copy link
Contributor

Luthaf commented Jun 16, 2014

Well, it finally works with this setting. But after three make clean && make pass, which is weird.

Thank you !

@timholy
Copy link
Member

timholy commented Jun 16, 2014

I just got bit by the same compilation error as @Luthaf. To make it easier for others to search for the issue, one of the final errors is

../kernel/x86_64/dgemm_kernel_4x4_haswell.S:1743: Error: no such instruction: `vpermpd $ 0xb1,%ymm3,%ymm3'

I did a make -C deps clean-openblas and then used @tkelman's solution 2 comments above. Worked for me.

@tkelman
Copy link
Contributor

tkelman commented Jun 17, 2014

If this ends up being really common, should we try to come up with a little configure-style probe and do this automatically or suggest the fix within the makefile?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants