Skip to content
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

Copy-if-different error while trying to build brainflow libraries using OS64COMBINED #187

Open
ScottThomasMiller opened this issue Oct 15, 2023 · 1 comment

Comments

@ScottThomasMiller
Copy link

Hi! I am trying to build the brainflow libs using ios-cmake for OS64COMBINED, but I am getting the following error:

/bin/sh -c /Users/scottmiller/git/brainflow/build/brainflow.build/Release-iphoneos/MuseLib.build/Script-538A60576ABA9B7FDB978F8C.sh
Error copying file (if different) from "/Users/scottmiller/git/brainflow/compiled/libMuseLib.dylib" to "/Users/scottmiller/git/brainflow/nodejs_package/brainflow/lib/libMuseLib.dylib".
Command PhaseScriptExecution failed with a nonzero exit code

The dylib is being written to /Users/scottmiller/git/brainflow/compiled/Release/, not /Users/scottmiller/git/brainflow/compiled/.

Steps to reproduce:

mkdir -p ~/git
cd ~/git
rm -rf brainflow ios-cmake
git clone https://github.com/brainflow-dev/brainflow.git
git clone https://github.com/leetal/ios-cmake.git
cd brainflow
mkdir build
cd build
cmake .. -G Xcode -DCMAKE_TOOLCHAIN_FILE=~/git/ios-cmake/ios.toolchain.cmake -DPLATFORM="OS64COMBINED"
#to silence warnings about deployment targets:
sed -e "s|IPHONEOS_DEPLOYMENT_TARGET = 11.0|IPHONEOS_DEPLOYMENT_TARGET = 16.0|g" brainflow.xcodeproj/project.pbxproj > temp.txt
cp temp.txt brainflow.xcodeproj/project.pbxproj
cmake --build . --config Release -- CODE_SIGNING_ALLOWED=NO

Thanks!

@ScottThomasMiller
Copy link
Author

After some experimentation I found that if I open the generated project file in Xcode, and check the boxes next to "For install builds only" and "Based on dependency analysis" under Build Phases->CMake PostBuild Rules, then the errors go away.

Is that a good approach? If so, then is there any way to generate the project file with those options already checked?

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

No branches or pull requests

1 participant