Skip to content
This repository has been archived by the owner on Jan 22, 2021. It is now read-only.

XCode build failed #11

Closed
francoisreme opened this issue Aug 24, 2016 · 11 comments
Closed

XCode build failed #11

francoisreme opened this issue Aug 24, 2016 · 11 comments

Comments

@francoisreme
Copy link

Hi Matthiew.

I'm trying to build AudioTK on XCode.

I installed Boost, libsndfile et fftw via macports and the CMake generation process seem to work more or less, except for FFTW but I tried to run a build and hoped to see work not every module but at least get ATK Core to build.

My cmake output is :

_INFO Build shared libraries: ON
INFO Build static libraries: OFF
INFO Build tests: ON
Could NOT find FFTW (missing: FFTW_LIBRARY_FFTW3 FFTW_LIBRARY_FFTW3F FFTW_LIBRARIES FFTW_INCLUDES)
Boost version: 1.61.0
Boost version: 1.61.0
Found the following Boost libraries:
unit_test_framework
system
Boost version: 1.61.0
Found the following Boost libraries:
unit_test_framework
timer
system
chrono
Configuring done
CMake Warning (dev):
Policy CMP0042 is not set: MACOSX_RPATH is enabled by default. Run "cmake
--help-policy CMP0042" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.

MACOSX_RPATH is not specified for the following targets:

ATKAdaptive
ATKCore
ATKDelay
ATKDistortion
ATKDynamic
ATKEQ
ATKIO
ATKMock
ATKPreamplifier
ATKReverberation
ATKSpecial
ATKTools
ATKUtility

This warning is for project developers. Use -Wno-dev to suppress it.

Generating done_

the build fails in TypedBaseFilter.cpp and there was to issue there :
At first in the with RValue constructor
template<typename DataType> TypedBaseFilter<DataType>::TypedBaseFilter(TypedBaseFilter&& other) :Parent(static_cast<Parent &&>(std::move(other))),

There was an error if I was not casting std::move(other) to RValue type.

I confess I'm not fluent at all with C++11 Feature and I'm lost there.

I hope you have a OS X and you could try a build on your machine, or maybe you got an idea of what's happenning ?

I'm on OS X El-Capitain. I use LLVM.

Thank you

@mbrucher
Copy link
Owner

By default, C++11 is not activated on the main compilers used by the users (although it starts coming with VS and GCC6).
In your case, you need to add -std=c++11 to the CMAKE_CXX_FLAGS and that should do the trick ;)

@francoisreme
Copy link
Author

Thank you Matthiew ! I was this I had to enable C++ 11 option on every subtarget.
Strangely it's a custom post build who fails now : And builds fails after ATKCore !

PhaseScriptExecution CMake\ PostBuild\ Rules build/ATK/Core/AudioTK.build/Debug/ATKCore.build/Script-FEBD7229655F40AEA2FDC66A.sh
cd "/Users/francoisreme/Project From Internet/AudioTK"
/bin/sh -c "/Users/francoisreme/Project\ From\ Internet/AudioTK/build/ATK/Core/AudioTK.build/Debug/ATKCore.build/Script-FEBD7229655F40AEA2FDC66A.sh"

echo "Staging dSYM for ATKCore"
Staging dSYM for ATKCore
cd /Users/francoisreme/Project\ From\ Internet/AudioTK/build/ATK/Core && dsymutil libATKCore.dylib
error: cannot parse the debug map for "libATKCore.dylib": No such file or directory
make: *** [ATKCore_buildpart_0] Error 1

@mbrucher
Copy link
Owner

That's annoying... There may be an issue with the dependency ordering at the moment. Is the file available in the build folder /Users/francoisreme/Project\ From\ Internet/AudioTK/build/ATK/Core?

@francoisreme
Copy link
Author

francoisreme commented Aug 24, 2016

Here come the content of the generated Core directory :

Edit :
/Users/francoisreme/Project\ From\ Internet/AudioTK/build/ATK/Core
├── AudioTK.build
│   └── Debug
│   └── ATKCore.build
│   ├── Objects-normal
│   │   └── x86_64
│   │   ├── ATKCore.LinkFileList
│   │   ├── ATKCore_dependency_info.dat
│   │   ├── BaseFilter.d
│   │   ├── BaseFilter.dia
│   │   ├── BaseFilter.o
│   │   ├── InPointerFilter.d
│   │   ├── InPointerFilter.dia
│   │   ├── InPointerFilter.o
│   │   ├── OutPointerFilter.d
│   │   ├── OutPointerFilter.dia
│   │   ├── OutPointerFilter.o
│   │   ├── PipelineGlobalSinkFilter.d
│   │   ├── PipelineGlobalSinkFilter.dia
│   │   ├── PipelineGlobalSinkFilter.o
│   │   ├── TypedBaseFilter.d
│   │   ├── TypedBaseFilter.dia
│   │   ├── TypedBaseFilter.o
│   │   ├── Utilities.d
│   │   ├── Utilities.dia
│   │   └── Utilities.o
│   ├── Script-FB573317575F4A62959C636C.sh
│   ├── dgph
│   └── dgph~
├── CMakeFiles
├── CMakeScripts
│   ├── ATKCore_postBuildPhase.makeDebug
│   ├── ATKCore_postBuildPhase.makeMinSizeRel
│   ├── ATKCore_postBuildPhase.makeRelWithDebInfo
│   └── ATKCore_postBuildPhase.makeRelease
├── CTestTestfile.cmake
├── Debug
│   └── libATKCore.dylib
└── cmake_install.cmake

Sorry, the file is there but there is only an issue about his location !

@mbrucher
Copy link
Owner

mbrucher commented Aug 24, 2016

I see, it's in the subfolder.
Well, I'll have to have a closer look later next week, I'm too busy to fix the issue in the next few days :/
What you can do is either use a release build, or you can change the main CMakeLists.txt to add Debug in the dsym working folder :/

@francoisreme
Copy link
Author

Changing in main CMakeList to :
POST_BUILD
COMMAND dsymutil Debug/$<TARGET_FILE_NAME:${target}>
Works like a charm. Thank you for you help, I will now be able to perform tests !

Thanks !

@mbrucher
Copy link
Owner

Really strange, I can't reproduce the issue. Maybe because my xcode project lived through several CMake versions :/ I'll have to start from scratch one day :/

@mbrucher
Copy link
Owner

Oh!
You may have had CMAKE_BUILD_TYPE set to empty or not defined?

@francoisreme
Copy link
Author

Yes, it's empty...and that's cool ?

@mbrucher
Copy link
Owner

It should be set to Debug or Release, depending on your build. That must be why you have that error.

@francoisreme
Copy link
Author

francoisreme commented Aug 24, 2016

Ok. It's works. I think there is a better way to handle this with CMake.
I mean because this kind of exe location path changes might depend from configuration, and can't be static on cmake configuration time (it's make "useless" the configuration thing of CMake)

I personnaly use the $<TARGET_FILE:tgt> command who work pretty well :
https://cmake.org/cmake/help/v3.0/manual/cmake-generator-expressions.7.html
(I have probleme to format the < on github using \ or not)
Cheers :-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants