Created attachment 178279 [details] Use system-defined compilers My julia build failed with the following error: ===> Building for julia-0.5.0 gmake[1]: Entering directory '/wrkdirs/usr/ports/lang/julia/work/julia-0.5.0' Creating usr/etc/julia/juliarc.jl Copying in usr/share/man/man1/julia.1 Copying in usr/share/doc/julia/examples gmake[2]: Entering directory '/wrkdirs/usr/ports/lang/julia/work/julia-0.5.0/deps' gmake[3]: Entering directory '/wrkdirs/usr/ports/lang/julia/work/julia-0.5.0/deps/build/openspecfun-39699a1c1824bf88410cabb8a7438af91ea98f4c' gmake[3]: gfortran: Command not found gmake[3]: *** [Make.inc:69: amos/d1mach.f.o] Error 127 gmake[3]: Leaving directory '/wrkdirs/usr/ports/lang/julia/work/julia-0.5.0/deps/build/openspecfun-39699a1c1824bf88410cabb8a7438af91ea98f4c' gmake[2]: *** [/wrkdirs/usr/ports/lang/julia/work/julia-0.5.0/deps/openspecfun.mk:24: build/openspecfun-39699a1c1824bf88410cabb8a7438af91ea98f4c/libopenspecfun.so] Error 2 The patch specifies the CC, CXX, FC environment variables such that the desired compilers are used. -- Yunchih Chen, NTUCSIE WSLAB TA
I think the correct FC has been set by USE=fortran. https://svnweb.freebsd.org/ports/head/Mk/Uses/fortran.mk?revision=419511&view=markup#l39 What is your `make -V MAKE_ENV` ?
Here's the log of failed build: https://pkgbuild.csie.ntu.edu.tw/pkg-stat/data/freebsd10-default-workstation/2016-12-25_08h41m28s/logs/errors/julia-0.5.0.log and here's one with the above patch, which builds successfully: https://pkgbuild.csie.ntu.edu.tw/pkg-stat/data/freebsd10-default-workstation/2016-12-25_18h21m38s/logs/julia-0.5.0.log `FC="gfortran49"` is in MAKE_ENV of both builds; yet in the failed one, "gfortran" is the actual one used (which is rather bizarre?).
Created attachment 178293 [details] patch of files/patch-Make.inc It seems that julia's Makefile do not respect FC from environment. Please try out this patch.
Thanks, the patch-Make.inc patch works for me, here's the log: https://pkgbuild.csie.ntu.edu.tw/pkg-stat/data/freebsd10-default-workstation/2016-12-27_14h43m54s/logs/julia-0.5.0.log
A commit references this bug: Author: lwhsu Date: Tue Dec 27 09:59:18 UTC 2016 New revision: 429589 URL: https://svnweb.freebsd.org/changeset/ports/429589 Log: - Respect CC, CXX, FC PR: 215565 Submitted by: Yunchih Chen <yunchih.cat@gmail.com> Approved by: Iblis Lin <iblis@hs.ntnu.edu.tw> (maintainer) Changes: head/lang/julia/files/patch-Make.inc