Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Rectangle.cxx.o rectangle.cxx.o #4

Closed
thewtex opened this Issue · 6 comments

2 participants

@thewtex
Owner

Some versions of Mac OSX seem to be confused by this case distinction. Windows may also get confused. Consider renaming.

@thewtex
Owner

This was fixed with pull request #2,

6b7a652

Cheers to Patrick!

@thewtex thewtex closed this
@katyhuff

This is actually still causing problems for me.

khuff@dyn-72-33-229-109:~/repos/bcyth $ make 
Scanning dependencies of target ReplicatePythonSourceTree
[  0%] Built target ReplicatePythonSourceTree
[  9%] Compiling Cython CXX source for pi_calculator...
Scanning dependencies of target pi_calculator
[ 18%] Building CXX object src/CMakeFiles/pi_calculator.dir/pi_calculator.cxx.o
[ 27%] Building CXX object src/CMakeFiles/pi_calculator.dir/PiCalculator.cxx.o
Linking CXX shared module pi_calculator.so
[ 27%] Built target pi_calculator
[ 36%] Compiling Cython CXX source for rectangle...
Scanning dependencies of target rectangle
[ 45%] Building CXX object src/CMakeFiles/rectangle.dir/rectangle.cxx.o
Linking CXX shared module rectangle.so
ld: duplicate symbol _initrectangle in CMakeFiles/rectangle.dir/Rectangle.cxx.o and CMakeFiles/rectangle.dir/rectangle.cxx.o
collect2: ld returned 1 exit status
make[2]: *** [src/rectangle.so] Error 1
make[1]: *** [src/CMakeFiles/rectangle.dir/all] Error 2
make: *** [all] Error 2
@thewtex
Owner

In your CMake configuration, are

PYTHON_LIBRARY
PYTHON_INCLUDE_DIR
CYTHON_EXECUTABLE

All pointing to versions that correspond to the same CPython?

@katyhuff

Hm. It looks as if they are... Here, I had them printed out below.

khuff@dyn-72-33-229-109:~/repos $ rm -rf bcyth/*
khuff@dyn-72-33-229-109:~/repos $ cd bcyth/
khuff@dyn-72-33-229-109:~/repos/bcyth $ cmake ../cython-cmake-example/ -DCYTHON_EXECUTABLE=/Library/Frameworks/EPD64.framework/Versions/7.3/bin/cython -DPYTHON_INCLUDE_DIR=/Library/Frameworks/EPD64.framework/Versions/7.3/Headers -DPYTHON_LIBRARY=/Library/Frameworks/EPD64.framework/Versions/7.3/lib/libpython2.7.dylib
-- The C compiler identification is GNU 4.2.1
-- The CXX compiler identification is GNU 4.2.1
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found Cython: /Library/Frameworks/EPD64.framework/Versions/7.3/bin/cython  
-- Found PythonLibs: /Library/Frameworks/EPD64.framework/Versions/7.3/lib/libpython2.7.dylib (found version "2.7.3") 
-- PYTHON_LIBRARY = /Library/Frameworks/EPD64.framework/Versions/7.3/lib/libpython2.7.dylib
-- PYTHON_INCLUDE_DIR = /Library/Frameworks/EPD64.framework/Versions/7.3/Headers
-- CYTHON_EXECUTABLE = /Library/Frameworks/EPD64.framework/Versions/7.3/bin/cython
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/khuff/repos/bcyth
khuff@dyn-72-33-229-109:~/repos/bcyth $ make
Scanning dependencies of target ReplicatePythonSourceTree
[  0%] Built target ReplicatePythonSourceTree
[  9%] Compiling Cython CXX source for pi_calculator...
Scanning dependencies of target pi_calculator
[ 18%] Building CXX object src/CMakeFiles/pi_calculator.dir/pi_calculator.cxx.o
[ 27%] Building CXX object src/CMakeFiles/pi_calculator.dir/PiCalculator.cxx.o
Linking CXX shared module pi_calculator.so
[ 27%] Built target pi_calculator
[ 36%] Compiling Cython CXX source for rectangle...
Scanning dependencies of target rectangle
[ 45%] Building CXX object src/CMakeFiles/rectangle.dir/rectangle.cxx.o
Linking CXX shared module rectangle.so
ld: duplicate symbol _initrectangle in CMakeFiles/rectangle.dir/Rectangle.cxx.o and CMakeFiles/rectangle.dir/rectangle.cxx.o
collect2: ld returned 1 exit status
make[2]: *** [src/rectangle.so] Error 1
make[1]: *** [src/CMakeFiles/rectangle.dir/all] Error 2
make: *** [all] Error 2
@thewtex thewtex referenced this issue from a commit
@thewtex Rename rectangle module to rect. #4.
To deal with case-insensitivity on Mac.
5561b34
@thewtex
Owner

Yeah, looks good @katyhuff . I suspect case insensitive filesystem shenanigans. Please pull and try again.

@katyhuff

Yep, works! Sorry, I should have just pull-requested a similar change. Thanks so much for looking at it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.