Bug 215565 - lang/julia Use system-defined compilers
Summary: lang/julia Use system-defined compilers
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Li-Wen Hsu
Depends on:
Reported: 2016-12-26 02:45 UTC by Yunchih Chen
Modified: 2016-12-27 09:59 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (iblis.dif01)

Use system-defined compilers (475 bytes, patch)
2016-12-26 02:45 UTC, Yunchih Chen
no flags Details | Diff
patch of files/patch-Make.inc (1.04 KB, patch)
2016-12-26 16:51 UTC, Iblis Lin
iblis.dif01: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yunchih Chen 2016-12-26 02:45:36 UTC
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.

Comment 1 Iblis Lin 2016-12-26 03:30:09 UTC
I think the correct FC has been set by USE=fortran.


What is your `make -V MAKE_ENV` ?
Comment 2 Yunchih Chen 2016-12-26 15:40:50 UTC
Here's the log of failed build:

and here's one with the above patch, which builds successfully:

`FC="gfortran49"` is in MAKE_ENV of both builds; yet in the failed one, "gfortran" is the actual one used (which is rather bizarre?).
Comment 3 Iblis Lin 2016-12-26 16:51:48 UTC
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.
Comment 4 Yunchih Chen 2016-12-27 06:55:22 UTC
Thanks, the patch-Make.inc patch works for me, here's the log:

Comment 5 commit-hook freebsd_committer 2016-12-27 09:59:27 UTC
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

  - Respect CC, CXX, FC

  PR:		215565
  Submitted by:	Yunchih Chen <yunchih.cat@gmail.com>
  Approved by:	Iblis Lin <iblis@hs.ntnu.edu.tw> (maintainer)