Problems Compiling PySide on MacOSX - macos

I'm trying to compile PySide on a Mac (to use it with a software that has its own Python interpreter, that's why I can't use the binaries installers), and I have some issues I don't know how to solve...
I am using mac 10.8, and all dependencies (Cmake, XCode...) are up-to-date.
I don't know what's wrong, and I am now out of ideas.
here is the last part of what the compiler tells me:
Linking CXX executable testcontainer
[ 39%] Built target testcontainer
[ 39%] Generating testctorinformation.moc
Scanning dependencies of target testctorinformation
[ 39%] Building CXX object ApiExtractor/tests/CMakeFiles/testctorinformation.dir/testctorinformation.cpp.o
1 warning generated.
Linking CXX executable testcodeinjection
Undefined symbols for architecture x86_64:
"QCoreApplication::QCoreApplication(int&, char**, int)", referenced from:
TestCodeInjections::testReadFileUtf8() in testcodeinjection.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [ApiExtractor/tests/testcodeinjection] Error 1
make[1]: *** [ApiExtractor/tests/CMakeFiles/testcodeinjection.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
In file included from /Users/jle_guen/Desktop/C4D MAC/BuildScripts-master/shiboken/ApiExtractor/tests/testconversionruletag.cpp:26:
In file included from /Users/jle_guen/Desktop/C4D MAC/BuildScripts-master/shiboken/ApiExtractor/tests/testutil.h:27:
In file included from /Users/jle_guen/Desktop/C4D MAC/BuildScripts-master/shiboken/ApiExtractor/abstractmetabuilder.h:28:
/Users/jle_guen/Desktop/C4D MAC/BuildScripts-master/shiboken/ApiExtractor/abstractmetalang.h:1347:10: warning:
private field 'm_reserveIn file included from /Users/jle_guen/Desktop/C4D MAC/BuildScripts-master/shiboken/ApiExtractor/tests/testconversionoperator.cpp:26:
In file included from /Users/jle_guen/Desktop/C4D MAC/BuildScripts-master/shiboken/ApiExtractor/tests/testutil.h:27:
In file included from /Users/jle_guen/Desktop/C4D MAC/BuildScripts-master/shiboken/ApiExtractor/abstractmetabuilder.h:28:
/Users/jle_guen/Desktop/C4D MAC/BuildScripts-master/shiboken/ApiExtractor/abstractmetalang.h:1347:10: warning:
private field 'm_reserved' is not used [-Wunused-private-field]
d' is not used [-Wunused-private-field]
uint m_reserved : 31;
^
uint m_reserved : 31;
^
1 warning generated.
Linking CXX executable testconversionruletag
[ 39%] Built target testconversionruletag
1 warning generated.
Linking CXX executable testconversionoperator
[ 39%] Built target testconversionoperator
In file included from /Users/jle_guen/Desktop/C4D MAC/BuildScripts-master/shiboken/ApiExtractor/tests/testctorinformation.cpp:25:
In file included from /Users/jle_guen/Desktop/C4D MAC/BuildScripts-master/shiboken/ApiExtractor/abstractmetabuilder.h:28:
/Users/jle_guen/Desktop/C4D MAC/BuildScripts-master/shiboken/ApiExtractor/abstractmetalang.h:1347:10: warning:
private field 'm_reserved' is not used [-Wunused-private-field]
uint m_reserved : 31;
^
1 warning generated.
Linking CXX executable testctorinformation
[ 39%] Built target testctorinformation
make: *** [all] Error 2

Related

Cannot find a link library (lNrrdIO)

I am trying to install NrrdIO on Ubuntu 18.04, to run Marching Cubes to segment medical images. This is the link from which I'm trying to run it.
http://web.cse.ohio-state.edu/research/graphics/isotable/
I'm trying to install ijkmcube-v0-3-3.tar, which requires the ITKNrrdIO.a library. I'm running into this error:
[ 7%] Linking CXX executable ijkmcube
/usr/bin/ld: cannot find -lNrrdIO
collect2: error: ld returned 1 exit status
CMakeFiles/ijkmcube.dir/build.make:406: recipe for target 'ijkmcube' failed
make[2]: *** [ijkmcube] Error 1
CMakeFiles/Makefile2:131: recipe for target 'CMakeFiles/ijkmcube.dir/all' failed
make[1]: *** [CMakeFiles/ijkmcube.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
I've installed NrrdIO 1.11.0, and tried with NrrdIO 1.9.0 as well, but while running
make
I always run into this error, for some reason its not able to find lNrrdIO . Can someone please help?
Thanks
Edit:
I think its a problem with the linking, but when I copied the NrrdIO.a file to /usr/bin and modified the symbolic link to point to it, I got an error as follows:
[ 7%] Linking CXX executable ijkmcube
collect2: fatal error: cannot find 'ld'
compilation terminated.
CMakeFiles/ijkmcube.dir/build.make:406: recipe for target 'ijkmcube'
failed
make[2]: *** [ijkmcube] Error 1
CMakeFiles/Makefile2:131: recipe for target '
CMakeFiles/ijkmcube.dir/all' failed
make[1]: *** [CMakeFiles/ijkmcube.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
Can someone help? Thank you
Edit 2
PROJECT(IJKMCUBE)
#---------------------------------------------------------
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
IF (NOT DEFINED ${IJK_DIR})
GET_FILENAME_COMPONENT(IJK_ABSOLUTE_PATH "../.." ABSOLUTE)
SET(IJK_DIR ${IJK_ABSOLUTE_PATH} CACHE PATH "IJK directory")
ENDIF (NOT DEFINED ${IJK_DIR})
SET(CMAKE_INSTALL_PREFIX "${IJK_DIR}/")
SET(LIBRARY_OUTPUT_PATH ${IJK_DIR}/lib CACHE PATH "Library directory")
SET(IJKMCUBE_DIR "src/ijkmcube")
SET(NRRD_LIBDIR "${IJK_DIR}/lib")
SET(IJK_ISOTABLE_DIR "${IJK_DIR}/isotable" CACHE PATH "Isotable
directory")
#---------------------------------------------------------
IF (NOT CMAKE_BUILD_TYPE)
SET (CMAKE_BUILD_TYPE Release CACHE STRING
"Default build type: Release" FORCE)
ENDIF (NOT CMAKE_BUILD_TYPE)
INCLUDE_DIRECTORIES("${IJK_DIR}/include")
LINK_DIRECTORIES("${NRRD_LIBDIR}")
LINK_LIBRARIES(expat NrrdIO z)
ADD_DEFINITIONS(-DIJK_ISOTABLE_DIR=\"${IJK_ISOTABLE_DIR}\")
ADD_EXECUTABLE(ijkmcube ijkmcube_main.cxx ijkmcubeIO.cxx ijkmcube.cxx
ijkmcube_datastruct.cxx ijkmcube_sub.cxx
ijkmcube_extract.cxx ijkmcube_util.cxx
ijksnapmc.cxx
ijktable.cxx ijktable_poly.cxx ijktable_ambig.cxx
ijkoctree.cxx ijkxitIO.cxx)
ADD_LIBRARY(ijkmcubeL STATIC EXCLUDE_FROM_ALL ijkmcubeIO.cxx
ijkmcube.cxx ijkmcube_datastruct.cxx ijkmcube_sub.cxx
ijkmcube_extract.cxx ijkmcube_util.cxx ijksnapmc.cxx
ijktable.cxx ijkoctree.cxx ijkxitIO.cxx)
SET_TARGET_PROPERTIES(ijkmcubeL PROPERTIES OUTPUT_NAME ijkmcube)
ADD_CUSTOM_TARGET(lib DEPENDS ijkmcubeL)
SET(CMAKE_INSTALL_PREFIX ${IJK_DIR})
INSTALL(TARGETS ijkmcube DESTINATION "bin/linux")
ADD_CUSTOM_TARGET(tar WORKING_DIRECTORY ../.. COMMAND tar cvfh
${IJKMCUBE_DIR}/ijkmcube.tar ${IJKMCUBE_DIR}/README
${IJKMCUBE_DIR}/INSTALL ${IJKMCUBE_DIR}/RELEASE_NOTES
${IJKMCUBE_DIR}/*.cxx ${IJKMCUBE_DIR}/*.h ${IJKMCUBE_DIR}/*.txx
${IJKMCUBE_DIR}/CMakeLists.txt ${IJKMCUBE_DIR}/man/*
${IJKMCUBE_DIR}/ijkmcube_doxygen.config)
ADD_CUSTOM_TARGET(doc COMMAND doxygen ijkmcube_doxygen.config)
SOLVED
Tsyvarev solved it, the libNrrdIO.a file has to be copied to /usr/lib/. Refer to comments for the exact solution
This answer was given by #Tsyvarev:
By making a link named ld you are removing the original linker (ld). Without the linker you definitely cannot build any library. What you need is to make a link named lNrrdIO.a, so it will point to the actual library location: sudo ln -sfn /home/subham/Downloads/NrrdIO-1.9.0-src/lNrrdIO.a lNrrdIO.a (run this command from /usr/lib directory). And restore original /usr/bin/ld file.

fblualib installation in Ubunt16.04

I am trying to install fblualib from this link.
When I run ./install_all.sh inside fblualib, I have errors as
+ echo Building folly
Building folly
+ echo
+ cd /tmp/fblualib-build.zofU4g/folly/folly
+ autoreconf -ivf
autoreconf: 'configure.ac' or 'configure.in' is required
According to last discussion here, there is a discussion as "autotools based build system has been removed from Folly in favor of CMake, so you'll need to build Folly with CMake rather than autotools." so I go to folly folder
/tmp/fblualib-build.zofU4g/folly/build and try to build using `cmake`.
Then I have errors as
[ 36%] Building CXX object CMakeFiles/folly_base.dir/folly/detail/ThreadLocalDetail.cpp.o
In file included from /tmp/fblualib-build.zofU4g/folly/folly/detail/ThreadLocalDetail.h:33:0,
from /tmp/fblualib-build.zofU4g/folly/folly/detail/ThreadLocalDetail.cpp:16:
/tmp/fblualib-build.zofU4g/folly/folly/SharedMutex.h: In static member function ‘static void folly::threadlocal_detail::StaticMetaBase::onThreadExit(void*)’:
/tmp/fblualib-build.zofU4g/folly/folly/SharedMutex.h:457:33: error: ‘*((void*)& rlock +10)’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
!tryUnlockSharedDeferred(token.slot_)) {
^
/tmp/fblualib-build.zofU4g/folly/folly/detail/ThreadLocalDetail.cpp:169:31: note: ‘*((void*)& rlock +10)’ was declared here
SharedMutex::ReadHolder rlock(nullptr);
^
cc1plus: all warnings being treated as errors
CMakeFiles/folly_base.dir/build.make:1886: recipe for target 'CMakeFiles/folly_base.dir/folly/detail/ThreadLocalDetail.cpp.o' failed
make[2]: *** [CMakeFiles/folly_base.dir/folly/detail/ThreadLocalDetail.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/folly_base.dir/all' failed
make[1]: *** [CMakeFiles/folly_base.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
The error is happening in SharedMutex.h, what could be worng>

Building Artery on Ubuntu fails

When I try to build Artery on Ubuntu 16.04. the following happens after invoking
$ cmake --build /home/hardt/Veins/artery-master/build
[ 23%] Linking CXX shared library libartery.so
/usr/bin/ld: /usr/local/lib/libvanetza_btp.a(data_request.cpp.o): relocation R_X86_64_32 against `.bss' can not be used when making a shared
object; recompile with -fPIC
/usr/local/lib/libvanetza_btp.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
src/artery/CMakeFiles/artery.dir/build.make:954: recipe for target'src/artery/libartery.so' failed
make[2]: *** [src/artery/libartery.so] Error 1
CMakeFiles/Makefile2:229: recipe for target 'src/artery/CMakeFiles/artery.dir/all' failed
make[1]: *** [src/artery/CMakeFiles/artery.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
As I am not all that familiar with building source on Unix systems I am not quite sure how to deal with this error.
I am using cmake version 3.9.3, boost 1.65.1 and crypto++ 5.6.4 the geographiclib built without error as well.
As one can read in the comments, the problem is solved.
The path to the vanetza directory VANETZA_DIR in the cmake configuration was wrong. Correcting this via ccmake solved the problem.

Mac os 10.11.1 MakeFile erro: ext/numeric file not found

I am trying to compile a public software called CofiRank. Here is the link to package: https://github.com/markusweimer/cofirank
To compile it I run:
make -f CofiRank-Makefile.mk CONF=Deploy
and here is part of my terminal results:
g++ -D NDEBUG -c -g -Isrc -Ilibs -o build/Deploy/GNU-
MacOSX/src/loss/ndcgdomainmodel.o src/loss/ndcgdomainmodel.cpp
In file included from src/utils/ublastools.cpp:1:
src/utils/ublastools.hpp:17:10: fatal error: 'ext/numeric' file not found
#include <ext/numeric> // for iota
In file included from src/bmrm/solver/dualinnersolver.cpp:29:
src/utils/ublastools.hpp:17:10: fatal error: 'ext/numeric' file not found
#include <ext/numeric> // for iota
1 error generated.
make[2]: *** [build/Deploy/GNU-MacOSX/src/utils/ublastools.o] Error 1
make[2]: *** Waiting for unfinished jobs....
1 error generated.
make[2]: *** [build/Deploy/GNU-MacOSX/src/bmrm/solver/dualinnersolver.o]
In file included from src/bmrm/solver/daifletcherpgm.cpp:28:
In file included from src/bmrm/solver/daifletcherpgm.hpp:22:
In file included from src/bmrm/solver/dualinnersolver.hpp:6:
src/utils/ublastools.hpp:17:10: fatal error: 'ext/numeric' file not found
#include <ext/numeric> // for iota
1 error generated.
make[2]: *** [build/Deploy/GNU-MacOSX/src/loss/ndcgdomainmodel.o] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
I searched a lot but could not fix it. I think I need to use libstd++ instead lib++ which is the default of mac os, but I don't know how to (or if it is the problem)
can someone help me on this?
<ext/numeric> is a non-standard header file provided by the GNU C++ standard library (libstdc++) that comes with GCC.
You are probably compiling with Clang, and so need to tell it to use the GNU library not its own one, so compile with -stdlib=libstdc++

error when compile pgrouting in mac osx

I cannot compile the pgrouting. The error message shows like below :
[ 5%] Built target apsp_warshall
[ 11%] Built target astar
[ 17%] Built target kdijkstra
[ 20%] Building CXX object src/apsp_johnson/src/CMakeFiles/apsp_johnson.dir/apsp_johnson_boost_wrapper.cpp.o
clang: error: unknown argument: '-fno-delete-null-pointer-checks'
make[2]: *** [src/apsp_johnson/src/CMakeFiles/apsp_johnson.dir/apsp_johnson_boost_wrapper.cpp.o] Error 1
make[1]: *** [src/apsp_johnson/src/CMakeFiles/apsp_johnson.dir/all] Error 2
make: *** [all] Error 2
Can some guide me how to solve this. I'm using OSX Mavericks. Any info would be appreciated. Thank you.
I found that marking the flag below makes compile successful in file src/apsp_johnson/src/CMakeLists.txt :
#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-delete-null-pointer-checks")

Resources