Bug 200590 - science/hdf5: with FORTRAN option failed to build
Summary: science/hdf5: with FORTRAN option failed to build
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Sunpoet Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-02 10:05 UTC by fmysh
Modified: 2015-06-07 15:42 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (sunpoet)


Attachments
patch for Makefile (340 bytes, patch)
2015-06-02 10:05 UTC, fmysh
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description fmysh 2015-06-02 10:05:39 UTC
Created attachment 157369 [details]
patch for Makefile

science/hdf5 with FORTRAN option depends on lang/gcc48 for gfortran.
Build process fails trying to link with not /usr/local/lib/gcc48/libgcc_s.so.1 but /usr/lib/libgcc_s.so.1.

# make
(snip)
Making all in fortran
Making all in src
  FC       H5test_kind_STORAGE_SIZE.o
  FCLD     H5test_kind
/usr/local/lib/gcc48/libgfortran.so: undefined reference to `__getf2@GCC_4.6.0'
/usr/local/lib/gcc48/libgfortran.so: undefined reference to `__floatunditf@GCC_4.6.0'
/usr/local/lib/gcc48/libgfortran.so: undefined reference to `__subtf3@GCC_4.6.0'
/usr/local/lib/gcc48/libgfortran.so: undefined reference to `__multf3@GCC_4.6.0'
/usr/local/lib/gcc48/libgfortran.so: undefined reference to `__unordtf2@GCC_4.6.0'
/usr/local/lib/gcc48/libgfortran.so: undefined reference to `__lttf2@GCC_4.6.0'
/usr/local/lib/gcc48/libgfortran.so: undefined reference to `__addtf3@GCC_4.6.0'
/usr/local/lib/gcc48/libgfortran.so: undefined reference to `__gttf2@GCC_4.6.0'
/usr/local/lib/gcc48/libgfortran.so: undefined reference to `__divtf3@GCC_4.6.0'
/usr/local/lib/gcc48/libgfortran.so: undefined reference to `__letf2@GCC_4.6.0'
/usr/local/lib/gcc48/libgfortran.so: undefined reference to `__netf2@GCC_4.6.0'
/usr/local/lib/gcc48/libgfortran.so: undefined reference to `__floatditf@GCC_4.6.0'
/usr/local/lib/gcc48/libgfortran.so: undefined reference to `__trunctfdf2@GCC_4.6.0'
/usr/local/lib/gcc48/libgfortran.so: undefined reference to `__eqtf2@GCC_4.6.0'
/usr/local/lib/gcc48/libgfortran.so: undefined reference to `__floatsitf@GCC_4.6.0'
collect2: error: ld returned 1 exit status
*** [H5test_kind] Error code 1

Stop in /usr//ports/science/hdf5/work/hdf5-1.8.15/fortran/src.
*** [all-recursive] Error code 1

Stop in /usr/ports/science/hdf5/work/hdf5-1.8.15/fortran.
*** [all-recursive] Error code 1

Stop in /usr/ports/science/hdf5/work/hdf5-1.8.15.
*** [do-build] Error code 1

Stop in /usr/ports/science/hdf5.
*** [stage] Error code 1

Stop in /usr/ports/science/hdf5.


Generated Makefiles by configure have -L/usr/lib explicitly before -L/usr/local/lib/gcc48. They come from CONFIGURE_ARGS=--with-zlib=/usr.
As zlib is enabled by default, This is unnecessary.
Removing the argument cleared the problem.
Comment 1 commit-hook freebsd_committer 2015-06-07 15:39:27 UTC
A commit references this bug:

Author: sunpoet
Date: Sun Jun  7 15:39:08 UTC 2015
New revision: 388724
URL: https://svnweb.freebsd.org/changeset/ports/388724

Log:
  - Fix build with FORTRAN enabled

  Build failure with FORTRAN enabled was caused by configure-generated LDFLAGS
  where -L/usr/lib appeared before -L${LOCALBASE}/lib/gcc48. It is the simplest
  way to solve this problem by removing --with-zlib from CONFIGURE_ARGS.

  PR:		200590
  Submitted by:	Taoka Fumiyoshi <fmysh@iijmio-mail.jp>

Changes:
  head/science/hdf5/Makefile
Comment 2 Sunpoet Po-Chuan Hsieh freebsd_committer 2015-06-07 15:42:06 UTC
Committed. Thanks!