Minor makefile bug

Bug #1088838 reported by Martin Sandve Alnæs
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libadjoint
New
Undecided
Unassigned

Bug Description

Building libadjoint with these lines:

export PETSC_ARCH=linux-gnu-cxx-opt
export PETSC_DIR=${FENICS_UNSTABLE_DIR}
export SLEPC_DIR=${FENICS_UNSTABLE_DIR}
make install prefix=${FENICS_UNSTABLE_DIR}

where

martinal@martinal-mac:~/dev/external/libadjoint$ echo ${FENICS_UNSTABLE_DIR}
/home/martinal/opt/fenics/dorsal-unstable

The libadjoint build produces the following warning:
...
  INSTALL ///home/martinal/opt/fenics/dorsal-unstable/lib
...
gcc -pthread -fno-strict-aliasing /home/martinal/opt -fPIC -I/usr/include/python2.7 -c libadjoint/adj_python_utils.c -o build/temp.linux-x86_64-2.7/libadjoint/adj_python_utils.o
gcc: warning: /home/martinal/opt: linker input file unused because linking not done

That is, somehow half the install path was added to the gcc command for compiling adj_python_utils.c into adj_python_utils.o.

Revision history for this message
Patrick Farrell (pefarrell) wrote :

How strange!

adj_python_utils.c is compiled by python's distutils -- the Makefile calls setup.py, but we don't specify the compiler options.

Can you please remove the @ from the lines in the Makefile that call setup.py, and see what command is getting executed to call setup.py?

Revision history for this message
Martin Sandve Alnæs (martinal) wrote :

The only strange thing is the triple /, what's that for? Don't waste time on this one though, it doesn't stop the build.

  INSTALL ///home/martinal/opt/fenics/dorsal-unstable/lib/python2.7/dist-packages
cd python; python setup.py install --prefix=///home/martinal/opt/fenics/dorsal-unstable
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/libadjoint
copying libadjoint/libadjoint.py -> build/lib.linux-x86_64-2.7/libadjoint
copying libadjoint/libadjoint_numpy.py -> build/lib.linux-x86_64-2.7/libadjoint
copying libadjoint/exceptions.py -> build/lib.linux-x86_64-2.7/libadjoint
copying libadjoint/clibadjoint_constants.py -> build/lib.linux-x86_64-2.7/libadjoint
copying libadjoint/__init__.py -> build/lib.linux-x86_64-2.7/libadjoint
copying libadjoint/clibadjoint.py -> build/lib.linux-x86_64-2.7/libadjoint
running build_ext
building 'libadjoint.python_utils' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/libadjoint
gcc -pthread -fno-strict-aliasing /home/martinal/opt -fPIC -I/usr/include/python2.7 -c libadjoint/adj_python_utils.c -o build/temp.linux-x86_64-2.7/libadjoint/adj_python_utils.o
gcc: warning: /home/martinal/opt: linker input file unused because linking not done
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-x86_64-2.7/libadjoint/adj_python_utils.o -o build/lib.linux-x86_64-2.7/libadjoint/python_utils.so

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.