New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build Python swig bindings from INSTALL.md instructions #23

Closed
timduly4 opened this Issue Nov 8, 2016 · 2 comments

Comments

Projects
None yet
4 participants
@timduly4

timduly4 commented Nov 8, 2016

I am following UNIX-like Environment: Manual Build, Install, and Package from INSTALL.md, specifically Step 5:

   5. If you prefer to build and install GPSTk as a user library in $HOME/.local, 
      skip the previous step, and instead execute the following commands:

         $ cd $gpstk_root/build

         $ cmake -DPYTHON_INSTALL_PREFIX=$HOME/.local -DCMAKE_INSTALL_PREFIX=$HOME/.local/gpstk -DBUILD_EXT=1 -DBUILD_PYTHON=1 $gpstk_root

         $ export LD_LIBRARY_PATH=$HOME/.local/gpstk/lib:$LD_LIBRARY_PATH

         $ make

         $ make install 

         $ export PATH=$HOME/.local/gpstk/bin:$PATH

OK, let's run these commands:

~/gpstk_git $ echo $gpstk_root
/Users/timduly/gpstk_git

~/gpstk_git $ mkdir $gpstk_root/build
~/gpstk_git $ cd $gpstk_root/build

Running the cmake command:

$ cmake -DPYTHON_INSTALL_PREFIX=$HOME/.local -DCMAKE_INSTALL_PREFIX=$HOME/.local/gpstk -DBUILD_EXT=1 -DBUILD_PYTHON=1 $gpstk_root
<output>
$ export LD_LIBRARY_PATH=$HOME/.local/gpstk/lib:$LD_LIBRARY_PATH

Finally, running make, I make it to 97% (so close!):

~/gpstk_git/build $ make
<output> ...
Scanning dependencies of target example4
[ 95%] Building CXX object examples/CMakeFiles/example4.dir/example4.cpp.o
[ 96%] Linking CXX executable example4
[ 96%] Built target example4
[ 97%] Swig source
/Users/timduly/gpstk_git/ext/lib/Math/Expression.hpp:198: Warning 314: 'print' is a python keyword, renaming to '_print'
/Users/timduly/gpstk_git/ext/lib/Math/Expression.hpp:215: Warning 314: 'print' is a python keyword, renaming to '_print'
/Users/timduly/gpstk_git/ext/lib/Math/Expression.hpp:233: Warning 314: 'print' is a python keyword, renaming to '_print'
/Users/timduly/gpstk_git/ext/lib/Math/Expression.hpp:257: Warning 314: 'print' is a python keyword, renaming to '_print'
/Users/timduly/gpstk_git/ext/lib/Math/Expression.hpp:276: Warning 314: 'print' is a python keyword, renaming to '_print'
/Users/timduly/gpstk_git/ext/lib/Math/Expression.hpp:311: Warning 314: 'print' is a python keyword, renaming to '_print'
Scanning dependencies of target _gpstk
[ 97%] Building CXX object swig/CMakeFiles/_gpstk.dir/gpstkPYTHON_wrap.cxx.o
[ 97%] Linking CXX shared module _gpstk.so
[ 97%] Built target _gpstk
Scanning dependencies of target module_files_target
[ 97%] Generating module/gpstk/__init__.py
Error copying file (if different) from "/Users/timduly/gpstk_git/swig/gpstk/__init__.py" to "/Users/timduly/gpstk_git/build/swig/module/gpstk/__init__.py".
make[2]: *** [swig/module/gpstk/__init__.py] Error 1
make[1]: *** [swig/CMakeFiles/module_files_target.dir/all] Error 2
make: *** [all] Error 2

Any ideas? This error occurred on both Mac OS X and Ubuntu 14.04.

Thanks,
Tim

@timduly4 timduly4 changed the title from Cannot build Python swig bindings from INSTALL.md to Cannot build Python swig bindings from INSTALL.md instructions Nov 8, 2016

@protogeezer

This comment has been minimized.

Show comment
Hide comment
@protogeezer

protogeezer Apr 12, 2017

I've seen that error too.
I generally build with "sudo make" on OS X
Beyond that, try deleting the contents of "/Users/timduly/gpstk_git/build/swig/module/"
then build.

protogeezer commented Apr 12, 2017

I've seen that error too.
I generally build with "sudo make" on OS X
Beyond that, try deleting the contents of "/Users/timduly/gpstk_git/build/swig/module/"
then build.

@spire-cbatson

This comment has been minimized.

Show comment
Hide comment
@spire-cbatson

spire-cbatson Sep 21, 2018

This was fixed by 9a05e5a.

spire-cbatson commented Sep 21, 2018

This was fixed by 9a05e5a.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment