building in a poudriere jail, fails with: configure: finding C compiler checking for C compiler default output file name... configure: error: C compiler cannot create executables See `config.log' for more details. The full build log: http://eis.bris.ac.uk/~mexas/logs/netcdf3-3.6.3_5.log config.log: http://eis.bris.ac.uk/~mexas/logs/ia64-11-current-netcdf-config.log
Responsible Changed From-To: freebsd-ports-bugs->sunpoet Over to maintainer (via the GNATS Auto Assign Tool)
Hi, With lang/gcc installed, does this command fail on ia64: echo "int main(void) { return 0; }" | cc -o test -L/usr/local/lib/gcc46 -x c - How about this one: echo "int main(void) { return 0; }" | cc -o test -B/usr/local/bin -L/usr/local/lib/gcc46 -x c -
$ echo "int main(void) { return 0; }" | cc -o test -L/usr/local/lib/gcc46 -x c - /usr/local/lib/gcc46/libgcc_s.so: could not read symbols: File in wrong format $ echo "int main(void) { return 0; }" | cc -o test -B/usr/local/bin -L/usr/local/lib/gcc46 -x c - $
On Mon, 24 Feb 2014 02:34:48 -0800 (PST) Anton Shterenlikht wrote: > $ echo "int main(void) { return 0; }" | cc -o test -L/usr/local/lib/gcc46 -x c - > /usr/local/lib/gcc46/libgcc_s.so: could not read symbols: File in wrong format > $ echo "int main(void) { return 0; }" | cc -o test -B/usr/local/bin -L/usr/local/lib/gcc46 -x c - > $ Give the attached patch a try, also for PR 187000.
Now fails at: --- libnetcdff.la --- /bin/sh ../libtool --tag=CC --mode=link cc -O2 -pipe -fno-strict-aliasing -L/lib -version-info 4:0:0 -Wl,-rpath=/usr/local/lib/gcc46 -L/usr/local/lib/gcc46 -B/usr/local/bin -o libnetcdff.la -rpath /usr/local/lib fort-attio.lo fort-control.lo fort-dim.lo fort-genatt.lo fort-geninq.lo fort-genvar.lo fort-lib.lo fort-misc.lo fort-v2compat.lo fort-vario.lo fort-var1io.lo fort-varaio.lo fort-varmio.lo fort-varsio.lo ../f90/libnetcdff90.la libtool: link: cc -shared .libs/fort-attio.o .libs/fort-control.o .libs/fort-dim.o .libs/fort-genatt.o .libs/fort-geninq.o .libs/fort-genvar.o .libs/fort-lib.o .libs/fort-misc.o .libs/fort-v2compat.o .libs/fort-vario.o .libs/fort-var1io.o .libs/fort-varaio.o .libs/fort-varmio.o .libs/fort-varsio.o -Wl,--whole-archive ../f90/.libs/libnetcdff90.a -Wl,--no-whole-archive -L/lib -L/usr/local/lib/gcc46 -Wl,-rpath=/usr/local/lib/gcc46 -Wl,-soname -Wl,libnetcdff.so.4 -o .libs/libnetcdff.so.4 /usr/local/lib/gcc46/libgcc_s.so: could not read symbols: File in wrong format *** [libnetcdff.la] Error code 1 make[5]: stopped in /usr/ports/science/netcdf/work/netcdf-3.6.3/fortran 1 error
Author: tijl Date: Wed Feb 26 11:44:49 2014 New Revision: 346193 URL: http://svnweb.freebsd.org/changeset/ports/346193 QAT: https://qat.redports.org/buildarchive/r346193/ Log: Add -B${LOCALBASE}/bin to LDFLAGS just like compiler.mk does. This fixes linking problems when base system cc/c++ is used to link object files generated by gfortran. This affects FreeBSD/i386 8.x and all versions of FreeBSD/ia64. PR: ports/186946 Modified: head/Mk/Uses/fortran.mk Modified: head/Mk/Uses/fortran.mk ============================================================================== --- head/Mk/Uses/fortran.mk Wed Feb 26 11:27:56 2014 (r346192) +++ head/Mk/Uses/fortran.mk Wed Feb 26 11:44:49 2014 (r346193) @@ -25,7 +25,7 @@ FC= gfortran${_GCC_VER} FFLAGS+= -Wl,-rpath=${LOCALBASE}/lib/gcc${_GCC_VER} FCFLAGS+= -Wl,-rpath=${LOCALBASE}/lib/gcc${_GCC_VER} LDFLAGS+= -Wl,-rpath=${LOCALBASE}/lib/gcc${_GCC_VER} \ - -L${LOCALBASE}/lib/gcc${_GCC_VER} + -L${LOCALBASE}/lib/gcc${_GCC_VER} -B${LOCALBASE}/bin .elif ${fortran_ARGS} == ifort BUILD_DEPENDS+= ${LOCALBASE}/intel_fc_80/bin/ifort:${PORTSDIR}/lang/ifc RUN_DEPENDS+= ${LOCALBASE}/intel_fc_80/bin/ifort:${PORTSDIR}/lang/ifc _______________________________________________ svn-ports-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-ports-all To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Author: tijl Date: Thu Feb 27 09:51:45 2014 New Revision: 346312 URL: http://svnweb.freebsd.org/changeset/ports/346312 QAT: https://qat.redports.org/buildarchive/r346312/ Log: - Some ports ship with libtool 1.5.x + "anygcc" patch. This modified version calls "gcc" in two places. Replace that with $CC. - r346193 added -B${LOCALBASE}/bin in Uses/fortran.mk, just like compiler.mk, but libtool doesn't recognise this flag and discards it. Patch ltmain.sh so it passes the flag to the linker unmodified. This only works on libtool 2.x for now, but that's good enough to fix the PRs below and a linker error in math/octave on FreeBSD/i386 8.x. (When those ports set USES=libtool.) PR: ports/186946, ports/187000 Approved by: bapt Modified: head/Mk/Uses/libtool.mk Modified: head/Mk/Uses/libtool.mk ============================================================================== --- head/Mk/Uses/libtool.mk Thu Feb 27 09:49:51 2014 (r346311) +++ head/Mk/Uses/libtool.mk Thu Feb 27 09:51:45 2014 (r346312) @@ -19,12 +19,18 @@ _INCLUDE_USES_LIBTOOL_POST_MK= yes patch-libtool: @${FIND} ${WRKDIR} \( -name configure -or -name ltconfig \) \ -type f | ${XARGS} ${REINPLACE_CMD} \ + -e '/gcc_dir=\\`/s/gcc /$$CC /' \ + -e '/gcc_ver=\\`/s/gcc /$$CC /' \ -e '/link_all_deplibs[0-9A-Z_]*=/s/=unknown/=no/' \ -e 's,freebsd\*),freebsd\*|dragonfly\*),g' \ -e '/objformat=/s/echo aout/echo elf/' \ -e "/freebsd-elf\\*)/,/;;/ { \ /deplibs_check_method=/s/=.*/=pass_all/; }" + @${FIND} ${WRKDIR} -type f -name ltmain.sh | \ + ${XARGS} ${REINPLACE_CMD} \ + -e 's/|-p|-pg|/|-B*|-p|-pg|/' + .if ! ${libtool_ARGS:Moldver} @${FIND} ${WRKDIR} \( -name configure -or -name ltconfig \) \ -type f | ${XARGS} ${REINPLACE_CMD} \ _______________________________________________ svn-ports-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-ports-all To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Hi Anton, Can you try the attached patch for science/netcdf? You also need at least revision 346312 of the ports tree.
still the same error: libtool: link: cc -shared .libs/fort-attio.o .libs/fort-control.o .libs/fort-dim.o .libs/fort-genat.o .libs/fort-geninq.o .libs/fort-genvar.o .libs/fort-lib.o .libs/fort-misc.o .libs/fort-v2compat. .libs/fort-vario.o .libs/fort-var1io.o .libs/fort-varaio.o .libs/fort-varmio.o .libs/fort-varsio.o -Wl,--whole-archive ../f90/.libs/libnetcdff90.a -Wl,--no-whole-archive -L/lib -L/usr/local/lib/gc46 -Wl,-rpath=/usr/local/lib/gcc46 -Wl,-soname -Wl,libnetcdff.so.4 -o .libs/libnetcdff.so.4 /usr/local/lib/gcc46/libgcc_s.so: could not read symbols: File in wrong format *** [libnetcdff.la] Error code 1 make[5]: stopped in /usr/ports/science/netcdf/work/netcdf-3.6.3/fortran The ports are at 346342
yes, this patch seems to solve the problem: ====> Compressing man pages (compress-man) ====> Running Q/A tests (stage-qa) Warning: /usr/ports/science/netcdf/work/stage/usr/local/lib/libnetcdff.so.4.0.0 is not stripped consider using ${STRIP_CMD} Warning: /usr/ports/science/netcdf/work/stage/usr/local/lib/libnetcdf.so.4.0.0 is not stripped consider using ${STRIP_CMD} Warning: /usr/ports/science/netcdf/work/stage/usr/local/lib/libnetcdf_c++.so.4.0.0 is not stripped consider using ${STRIP_CMD} ===> Installing for netcdf3-3.6.3_6 ===> Checking if science/netcdf already installed ===> Registering installation for netcdf3-3.6.3_6 Installing netcdf3-3.6.3_6... done # I understand these warnings are benign. Many thanks Anton
On Thu, 27 Feb 2014 06:51:10 -0800 (PST) Anton Shterenlikht wrote: > yes, this patch seems to solve the problem: > > ====> Compressing man pages (compress-man) > ====> Running Q/A tests (stage-qa) > Warning: /usr/ports/science/netcdf/work/stage/usr/local/lib/libnetcdff.so.4.0.0 is not stripped consider using ${STRIP_CMD} > Warning: /usr/ports/science/netcdf/work/stage/usr/local/lib/libnetcdf.so.4.0.0 is not stripped consider using ${STRIP_CMD} > Warning: /usr/ports/science/netcdf/work/stage/usr/local/lib/libnetcdf_c++.so.4.0.0 is not stripped consider using ${STRIP_CMD} > ===> Installing for netcdf3-3.6.3_6 > ===> Checking if science/netcdf already installed > ===> Registering installation for netcdf3-3.6.3_6 > Installing netcdf3-3.6.3_6... done > # > > I understand these warnings are benign. > > Many thanks > > Anton Ok, I'll let Sunpoet deal with this further.
I'm now using a poudriere jail at r262690, and the ports tree at r347001, but the error is still there: http://eis.bris.ac.uk/~mexas/logs/netcdf3-3.6.3_5.log So the patch hasn't been committed yet? Thanks Anton
seems fixed in r347176. Please close this PR
State Changed From-To: open->closed Closed at maintainer's request.
Author: tijl Date: Thu Mar 6 16:35:32 2014 New Revision: 347269 URL: http://svnweb.freebsd.org/changeset/ports/347269 QAT: https://qat.redports.org/buildarchive/r347269/ Log: - Add USES=libtool to fix linker problem on FreeBSD/i386 8.x and FreeBSD/ia64 (binutils too old). - Staging. PR: ports/186946 Approved by: sunpoet (maintainer) Modified: head/science/netcdf/Makefile head/science/netcdf/pkg-plist Modified: head/science/netcdf/Makefile ============================================================================== --- head/science/netcdf/Makefile Thu Mar 6 16:33:17 2014 (r347268) +++ head/science/netcdf/Makefile Thu Mar 6 16:35:32 2014 (r347269) @@ -3,7 +3,7 @@ PORTNAME= netcdf PORTVERSION= 3.6.3 -PORTREVISION?= 5 +PORTREVISION?= 6 CATEGORIES= science MASTER_SITES= http://www.unidata.ucar.edu/downloads/netcdf/ftp/ \ ftp://ftp.unidata.ucar.edu/pub/netcdf/ \ @@ -19,17 +19,15 @@ PORTSCOUT= limit:^3\. CONFIGURE_ARGS= --enable-shared CPPFLAGS+= -I${LOCALBASE}/include -fPIC -DPIC GNU_CONFIGURE= yes +USES= libtool USE_LDCONFIG= yes INFO= netcdf netcdf-c netcdf-cxx netcdf-f77 netcdf-f90 \ netcdf-install netcdf-tutorial -MAN1= ncdump.1 ncgen.1 -MAN3= netcdf.3 OPTIONS_DEFINE= FORTRAN DOCS FORTRAN_DESC= Build library for Fortran -NO_STAGE= yes .include <bsd.port.options.mk> .if ${PORT_OPTIONS:MDOCS} @@ -41,7 +39,6 @@ CONFIGURE_ARGS+=--disable-docs-install .if ${PORT_OPTIONS:MFORTRAN} CPPFLAGS+= -DpgiFortran CONFLICTS+= netcdf-3.* -MAN3+= netcdf_f77.3 netcdf_f90.3 PLIST_SUB+= FORTRAN="" USES+= fortran .else Modified: head/science/netcdf/pkg-plist ============================================================================== --- head/science/netcdf/pkg-plist Thu Mar 6 16:33:17 2014 (r347268) +++ head/science/netcdf/pkg-plist Thu Mar 6 16:35:32 2014 (r347269) @@ -11,14 +11,22 @@ lib/libnetcdf.a lib/libnetcdf.la lib/libnetcdf.so lib/libnetcdf.so.4 +lib/libnetcdf.so.4.0.0 lib/libnetcdf_c++.a lib/libnetcdf_c++.la lib/libnetcdf_c++.so lib/libnetcdf_c++.so.4 +lib/libnetcdf_c++.so.4.0.0 %%FORTRAN%%lib/libnetcdff.a %%FORTRAN%%lib/libnetcdff.la %%FORTRAN%%lib/libnetcdff.so %%FORTRAN%%lib/libnetcdff.so.4 +%%FORTRAN%%lib/libnetcdff.so.4.0.0 +man/man1/ncdump.1.gz +man/man1/ncgen.1.gz +man/man3/netcdf.3.gz +%%FORTRAN%%man/man3/netcdf_f77.3.gz +%%FORTRAN%%man/man3/netcdf_f90.3.gz %%PORTDOCS%%%%DOCSDIR%%/ncgen-man-1.html %%PORTDOCS%%%%DOCSDIR%%/ncdump-man-1.html %%PORTDOCS%%%%DOCSDIR%%/netcdf-c.html _______________________________________________ svn-ports-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-ports-all To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"