ros_for_ios
ros_for_ios copied to clipboard
build.sh: usr/bin//lipo: can't open input file: iphone-build/stage/lib/libboost_thread.a (No such file or directory)
The above error occurs when running build.sh on a git checkout from today. libboost_thread.a does exist in "ros_for_ios/boostonios/osx-build/stage/lib", so it looks like boost builds fine. What might be going wrong here? Build log: http://pastebin.com/7hQCvAnw
The boost script compiles the latest version of boost on the svn. Currently, the latest version is 1_54_0_beta1 which cannot be compiled for iOS. You can replace the line 100 of the boost.sh file in the boostonios directory by "BOOST_BRANCH=Boost_1_53_0". You have to delete all the old directories and run the script again. Moreover, it appears from the build log that you the iOS SDK for the Simulator is not installed on your system : "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk/usr/include/bzlib.h: No such file or directory" It can be installed via Xcode. I didn't test the compilation process with the new Xcode 5 and iOS 7 but the SDK version can be changed at the beginning of the boost.sh script.
I have changed BOOST_BRANCH='Boost_1_53_0' and IPHONE_SDKVERSION=7.0 in boost.sh. Now the missing headers are successfully copied from the iOS 7 SDK. Still, an 'ar' binary is missing: ./boost.sh: line 216: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin//ar: No such file or directory (line 562 in the log) The /usr/bin/ar binary does exist in the iPhoneOS.platform companion, though. Unfortunately, it is quite difficult to search the web for a 2-character-word like 'ar' :) Xcode (5.0) only offers me SDKs for iOS 6.x and 5.x, no additional packages for 7.0. I should have them installed anyway as my GUI prototype runs in the emulator. Do you have another hint or should I ask in the boostonios issue tracker?
Build log: http://pastebin.com/vspavv9N
I also tried with iOS 7.0 and Xcode (5.0 and not 4.5...). I got exactly the same error. 'ar' binary (ar for archive) is a tool able to create and maintain library archives. It is used in this script to create a static library containing armv7, armv7s and x386 objects (You can try 'man ar' in the terminal). I believe that this command line tool has been moved/removed from : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin with the new Xcode release. I noticed that 'ar' is still present for the real target (arm). I tried to replace the variable $SIM_DEV_DIR by $ARM_DEV_DIR (line 215, 219 and 222) in the script and it worked ('ar' should be the same for all the platforms). If you want I can provide you the generated frameworks while all the problems related to the new iOS7 are solved. Posting a message in the boostonios issue tracker is also a very good idea.
Providing the frameworks would be great. Replacing the variables helped indeed, the ros_for_ios/build.sh ran successfully now. Still, I failed at getting the xcode demo project to build. It looks like the demo project was in a subfolder before and isn't anymore now, so I changed '"$(SRCROOT)/../../ros/frameworks"' to '"$(SRCROOT)/../ros/frameworks"', but still Xcode fails to find lots of the referenced frameworks including all of rosmsg and roscore except libiconv.
Manually re-adding ros.framework from ros_for_ios/ros/frameworks/CMakeLists.txt.framework/Versions/A/Headers/frameworks didn't resolve the include errors where <ros/init.h> and <ros/node_handle.h> are missing.
Ok for the framewoks. Tomorrow, I will verify with my supervisor the best way to share binaries as Github isn't a good platform to distribute large binaries (https://help.github.com/articles/distributing-large-binaries).
I removed the demo project from a sub-folder and I may have forgotten to change the Xcode paths. I will commit a correct version of the Xcode project settings.
Can you send me the log file of the ros_for_ios compilation (log.txt next to build.sh) ? It looks like the frameworks haven't been generated. libiconv is found because it's a system dependency.
Looks like the build indeed failed although build.sh didn't notice that. I found the first errors around line 1550. In line 1578, configure cannot find the gcc binary in iPhoneOS.platform, but it exists in iPhoneSimulator.platform. I'm not really sure which errors are just caused by the first ones though. http://pastebin.com/yUygi2jU (Shortened checkout logs and some compiler calls to keep it readable. Edit: full log: http://nightsoul.org/files/log.txt.gz)
The error handling is not perfect in the build.sh script. The good news is that the roscore, rosmsgs, log4cxx, and boost are built and the frameworks are generated so you can start a more basic xcode project that the one include here. The bad news is that the image_transport package which requires ffmepg (https://github.com/lvjian700/ffmpegc) is not built correctly. As you noticed : "No working C compiler is found" and I got the same error on my system. I will investigate the issue.
I changed the sdk version in the ffmpeg scripts (compile-armv7s.sh, compile-armv7.sh, and compile-i386.sh) but it still cannot find the assembler and C Compiler. I posted a message in the ffmpeg issues tracker : https://github.com/lvjian700/ffmpegc/issues/3
The frameworks (generated with iOS 6.1) are now available at https://sourceforge.net/projects/ros4ios/