Date: Mon, 26 Jan 2015 18:03:18 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 197103] [patch proposal] science/vmd fails to build on systems without gcc Message-ID: <bug-197103-13@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197103 Bug ID: 197103 Summary: [patch proposal] science/vmd fails to build on systems without gcc Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: freebsd-ports-bugs@FreeBSD.org Reporter: sakaue.mamoru@mwghennndo.com Created attachment 152189 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=152189&action=edit Patch to fix build failure on systems without gcc I experienced build failure of science/vmd on 10.1-RELEASE where gcc, g++ and cc have been removed from the base system. In such systems, gcc installed by ports/packages should be used. My patch fixes the symptom in such systems keeping the compatibility with the older systems. Following is from the log of the build failure: ------------------------------------------------------------------------ root@tmpjail:/ # env LANG=C make -C /usr/ports/science/vmd/ ===> vmd-1.9.1_3 depends on file: /usr/local/sbin/pkg - found ===> Fetching all distfiles required by vmd-1.9.1_3 for building ===> Extracting for vmd-1.9.1_3 => SHA256 Checksum OK for vmd-1.9.1.src.tar.gz. => SHA256 Checksum OK for tachyon-0.99b2.tar.gz. => SHA256 Checksum OK for Stride_src.tar.Z. /bin/mkdir -p /usr/ports/science/vmd/work /usr/bin/tar -xzf /usr/ports/distfiles/vmd-1.9.1.src.tar.gz -C /usr/ports/science/vmd/work /usr/bin/tar -xzf /usr/ports/science/vmd/work/vmd-1.9.1/lib/surf/surf.tar.Z -C /usr/ports/science/vmd/work/vmd-1.9.1/lib/surf /usr/bin/tar -xzf /usr/ports/distfiles/tachyon-0.99b2.tar.gz -C /usr/ports/science/vmd/work/vmd-1.9.1/lib /usr/bin/tar -xzf /usr/ports/distfiles/Stride_src.tar.Z -C /usr/ports/science/vmd/work/vmd-1.9.1/lib/stride ===> Patching for vmd-1.9.1_3 ===> Applying FreeBSD patches for vmd-1.9.1_3 /usr/bin/sed -i.bak "s/-lpthread/-pthread/" /usr/ports/science/vmd/work/vmd-1.9.1/configure /usr/bin/sed -i.bak "s/-ltk8.5/-ltk85/" /usr/ports/science/vmd/work/vmd-1.9.1/configure /usr/bin/sed -i.bak "s/-ltcl8.5/-ltcl85/" /usr/ports/science/vmd/work/vmd-1.9.1/configure /usr/bin/sed -i.bak "s%\$python_dir/lib_\$config_arch%/usr/local%" /usr/ports/science/vmd/work/vmd-1.9.1/configure /usr/bin/sed -i.bak "s/python2.5/python2.7/" /usr/ports/science/vmd/work/vmd-1.9.1/configure /usr/bin/sed -i.bak "s/.SILENT:/#.SILENT:/" /usr/ports/science/vmd/work/plugins/Makefile /usr/bin/sed -i.bak "s/.SILENT:/#.SILENT:/" /usr/ports/science/vmd/work/plugins/*/Makefile /usr/bin/sed -i.bak "s%log2f(\([^ ,]*\))%logf(\1)/(float)M_LN2%g" /usr/ports/science/vmd/work/vmd-1.9.1/src/Orbital.C /usr/bin/sed -i.bak -e "s|%%PREFIX%%|/usr/local|g" -e "s|/usr/local|/usr/local|g" /usr/ports/science/vmd/work/vmd-1.9.1/configure ===> vmd-1.9.1_3 depends on executable: makedepend - found ===> vmd-1.9.1_3 depends on file: /usr/local/lib/python2.7/site-packages/Numeric/Numeric.py - found ===> vmd-1.9.1_3 depends on executable: gmake - found ===> vmd-1.9.1_3 depends on file: /usr/local/bin/python2.7 - found ===> vmd-1.9.1_3 depends on file: /usr/local/libdata/pkgconfig/glproto.pc - found ===> vmd-1.9.1_3 depends on file: /usr/local/libdata/pkgconfig/dri2proto.pc - found ===> vmd-1.9.1_3 depends on file: /usr/local/bin/perl5.18.4 - found ===> vmd-1.9.1_3 depends on shared library: libtcl85.so - found (/usr/local/lib/libtcl85.so.1.0) ===> vmd-1.9.1_3 depends on shared library: libtk85.so - found (/usr/local/lib/libtk85.so.1.0) ===> vmd-1.9.1_3 depends on shared library: libfltk.so - found (/usr/local/lib/libfltk.so.1.3) ===> vmd-1.9.1_3 depends on shared library: libnetcdf.so - found (/usr/local/lib/libnetcdf.so.4.3.2) ===> vmd-1.9.1_3 depends on shared library: libGLU.so - found (/usr/local/lib/libGLU.so.1.3.1) ===> Configuring for vmd-1.9.1_3 ===> Building for vmd-1.9.1_3 /usr/bin/env XDG_DATA_HOME=/usr/ports/science/vmd/work XDG_CONFIG_HOME=/usr/ports/science/vmd/work HOME=/usr/ports/science/vmd/work XDG_DATA_HOME=/usr/ports/science/vmd/work XDG_CONFIG_HOME=/usr/ports/science/vmd/work HOME=/usr/ports/science/vmd/work NO_PIE=yes SHELL=/bin/sh NO_LINT=YES PREFIX=/usr/local LOCALBASE=/usr/local LIBDIR="/usr/lib" CC="cc" CFLAGS="-O2 -pipe -fstack-protector -fno-strict-aliasing" CPP="cpp" CPPFLAGS="" LDFLAGS=" -fstack-protector" LIBS="" CXX="c++" CXXFLAGS="-O2 -pipe -fstack-protector -fno-strict-aliasing " MANPREFIX="/usr/local" BSD_INSTALL_PROGRAM="install -s -o root -g wheel -m 555" BSD_INSTALL_LIB="install -s -o root -g wheel -m 444" BSD_INSTALL_SCRIPT="install -o root -g wheel -m 555" BSD_INSTALL_DATA="install -o root -g wheel -m 0644" BSD_INSTALL_MAN="install -o root -g wheel -m 444" gmake bsd -C /usr/ports/science/vmd/work/vmd-1.9.1/lib/tachyon/unix && /bin/mv /usr/ports/science/vmd/work/vmd-1.9.1/lib/tachyon/compile/bsd/tachyon /usr/ports/science/vmd/work/vmd-1.9.1/lib/tachyon/tachyon_FREEBSDAMD64 gmake[1]: Entering directory '/usr/ports/science/vmd/work/vmd-1.9.1/lib/tachyon/unix' gmake all \ "ARCH = bsd" \ "CC = gcc" \ "CFLAGS += -O3 -fomit-frame-pointer -ffast-math -DBsd " \ "AR = ar" \ "ARFLAGS = r" \ "STRIP = strip" \ "RANLIB = ranlib" \ "LIBS = -L. -ltachyon -lm" gmake[2]: Entering directory '/usr/ports/science/vmd/work/vmd-1.9.1/lib/tachyon/unix' Building Tachyon Parallel Ray Tracing library Copyright 1994-2007, John E. Stone All Rights Reserveed Making architecture directory ../compile/bsd Making library directory ../compile/bsd/libtachyon gmake ../compile ../compile/bsd ../compile/bsd/libtachyon ../compile/bsd/libtachyon.a ../compile/bsd/tachyon gmake[3]: Entering directory '/usr/ports/science/vmd/work/vmd-1.9.1/lib/tachyon/unix' gmake[3]: Nothing to be done for '../compile'. gmake[3]: Nothing to be done for '../compile/bsd'. gmake[3]: Nothing to be done for '../compile/bsd/libtachyon'. gcc -O2 -pipe -fstack-protector -fno-strict-aliasing -O3 -fomit-frame-pointer -ffast-math -DBsd -c ../src/api.c -o ../compile/bsd/libtachyon/api.o gmake[3]: gcc: Command not found Makefile:371: recipe for target '../compile/bsd/libtachyon/api.o' failed gmake[3]: *** [../compile/bsd/libtachyon/api.o] Error 127 gmake[3]: Leaving directory '/usr/ports/science/vmd/work/vmd-1.9.1/lib/tachyon/unix' Makefile:84: recipe for target 'all' failed gmake[2]: *** [all] Error 2 gmake[2]: Leaving directory '/usr/ports/science/vmd/work/vmd-1.9.1/lib/tachyon/unix' Make-arch:989: recipe for target 'bsd' failed gmake[1]: *** [bsd] Error 2 gmake[1]: Leaving directory '/usr/ports/science/vmd/work/vmd-1.9.1/lib/tachyon/unix' *** Error code 2 Stop. make: stopped in /usr/ports/science/vmd ------------------------------------------------------------------------ The cause of this symptom is that the commands of gcc, g++ and cc are specified without the version suffix in makefiles and configure scripts. My patch modifies them to reflect ${CC} and ${CXX} defined by bsd.gcc.mk. I confirmed that the patched port succeeded the build and install on 10.1-RELEASE (amd64). -- You are receiving this mail because: You are the assignee for the bug.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-197103-13>