Installing Irrlicht on MaxOS Lion - osx-lion

I'm having trouble building Irrlicht Engine on MacOSX Lion. The process described on the wiki is not updated for Lion, and byt following this discussion I found on the web, I tried to build using xcodebuild -sdk macosx10.7 -arch x86_64, but I get the following error:
** BUILD FAILED **
The following build commands failed:
CompileC build/MacOSX.build/Release/libIrrlicht.a.build/Objects-normal/x86_64/COpenGLSLMaterialRenderer.o ../COpenGLSLMaterialRenderer.cpp normal x86_64 c++ com.apple.compilers.llvmgcc42
(1 failure)
My knowledge of MacOS building procedures and xcode terminal commands is limited, anyone could light me in the right direction?

I actually ended up finding the answer myself: http://dbrgames.wordpress.com/2011/12/31/compiling-irrlicht-1-7-2-with-mac-os-10-7-and-xcode-4-1/
Worked for me like a charm.

Related

.Net7 MAUI app unable to debug/publish with iOS16/Xcode 14

I can debug on MyMac (Mac Catalyst) no problem but not on the simulator, I get the following errors in the Application Output:
xcodebuild[4480:64944] Writing error result bundle to /var/folders/wh/z7x5swm90fb6f6cxfp39760h0000gn/T/ResultBundle_2022-30-10_10-46-0020.xcresult
xcodebuild: error: SDK "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" cannot be located.
xcrun: error: sh -c '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -find simctl 2> /dev/null' failed with exit code 16384: (null) (errno=Invalid argument)
xcrun: error: unable to find utility "simctl", not a developer tool or in PATH
I'm using VS17.4 (preview 5 I think, how do I check? It just says 17.4 build 2339) and Xcode 14 for the iOS 16 SDK. I've checked in Preferences > SDK Locations > Apple and everything looks as it should... I'm a Mac noob so is there just a setting I'm missing somewhere?
If I try to build the release for publish like so VisualStudio crashes!
dotnet publish -f:net7.0-ios -c:Release
Update:
I just dropped back to net6.0 and am getting the same error. I didn't have Xamarin.Mac installed but installing it made no difference.
Below are some more component details of VS:
Xamarin.iOS Version: 16.0.0.72 (Visual Studio Community)
Xcode 14.0.1 (21336)
Xamarin.Mac Version: 8.12.0.2 (Visual Studio Community)
I can also see that the directory referenced does exist, or is it not supposed to look like that?
I had two version of Xcode installed which seems to have confused things. Uninstalling both then reinstalling 14 has fixed the issue.

Running C++ in Eclipse on MacOS

I am using Eclipse IDE for C/C++ Developer on Mac OS Sierra 10.12.6. When I build a project (HelloWorld Project) I see a message:
"xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
"make clean" terminated with exit code 1. Build might be incomplete.
22:30:31 Build Finished. 0 errors, 0 warnings. (took 74ms)"
And I can't run the program
... three years later ...
Try installing the Xcode command-line tools by running xcode-select --install.

Nsight Eclipse Edition not finding nvcc

I just installed CUDA 5.0 Preview (Mac OS X Lion) and I'm having trouble with Nsight.
The toolkit seems to be installed correctly. (Driver loads, nvcc -V works in bash, samples work fine).
When I create a new project I get warnings:
Error launching external scanner info generator (nvcc -dryrun ...)
Program 'nvcc' is not found in $PATH
In Preferences -> CUDA Toolkit I get no CUDA-compatible devices detected. Which is strange because I have nVidia GT 650M on my machine. So why doesn't Nsight recognize it?
If I try to build a project I get 2 errors:
/bin/sh: nvcc: command not found
make: * [src/test.o] Error 127
How do you start Nsight? Do you use /usr/local/cuda/bin/nsight? Unfortunately, it is not currently possible to launch Nsight by double-clinking the application on Mac OS X.
In the CUDA 5.0 Preview build we had a bug when shell script did not properly setup paths. This is how this script looks like in latest internal toolkit builds (you may need to adjust paths depending on your toolkit install location - in the final release installer will handle it):
#!/bin/sh
PATH="$PATH:/Developer/NVIDIA/CUDA-5.0/bin" DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:/Developer/NVIDIA/CUDA-5.0/lib" "/Developer/NVIDIA/CUDA-5.0/libnsight/nsight.app/Contents/MacOS/nsight" $#

Debug ios Problems in command line- Xcode

I built a project to iPhone and debugging it in Xcode 4.3.2 works fine. However, I want to debug it in command line, so I run:
xcodebuild -target NAMEOFTARGET -sdk SDKPATH -configuration Release
it should be the same as in Xcode, but I'm getting some errors and it does not compile! Maybe someone could help...
-Prefix-cfqwmqlvdeltqcceqguoaugscmoq/Igor2305-Prefix.pch.d
error: can't exec '/opt/local/bin/gcc-apple-4.2' (No such file or directory)
Command /opt/local/bin/gcc-apple-4.2 failed with exit code 71
** BUILD FAILED **
The following build commands failed:
ProcessPCH /var/folders/d7/sx0vvl0537l4x7md9b35m7br0000gn/C/com.apple.Xcode.501/SharedPrecompiledHeaders/Igor2305-Prefix-fwljjtsqayhghvfeivuxdyjuvt/Igor2305-Prefix.pch.pth Igor2305/Igor2305-Prefix.pch normal armv6 objective-c com.apple.compilers.llvm.clang.1_0.compiler
ProcessPCH /var/folders/d7/sx0vvl057l4x7md9b35m7br00gn/C/com.apple.Xcode.501/SharedPrecompiledHeaders/Igor2305-Prefi-cfqwmqlvdeltqceqguoaugscmoq/Igor2305-Prefix.pch.pth Igor2305/Igor2305-Prefix.pch normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)
It's looking for GCC in /opt/ and not finding it. That's not a standard installation location for the GCC bundled with Xcode. The following command will tell you where Xcode is looking for its developer tools:
xcode-select -print-path
To change it, run:
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
That path is for the standard Xcode installation location as installed through the App Store. If you've installed it elsewhere, you'll have to alter the path accordingly.

Cross-compiling ZeroMQ to ARM for use in a MonoTouch iPhone app configure settings

I'm attempting to use the ZeroMQ library in an iPhone app developed in C# using MonoTouch. I've solved almost all of the problems, but have fallen at the last hurdle. I'm using ZeroMQ 2.1.10, and the C# CLR binding/wrapper, and developing in Mac OS X 10.6.8. Here's the story so far:
I first attempted to use ZeroMq in a simple Mono C# Console app. I built ZeroMQ with ./configure, then make and sudo make install, which installs shared library /usr/local/lib/libzmq.dylib. The ZeroMq C# binding clrzmq.dll is a wrapper that uses the 'core' ZeroMq functionality via C Api [DllImport] calls.
The test app didn't work, which I figured out to be that the standard ZeroMQ ./configure produces a 64-bit output, and Mono is only 32 bit. I then rebuilt ZeroMQ with
./configure CFLAGS="-O -arch i386" CXXFLAGS="-O -arch i386" LDFLAGS="-arch i386" --disable-dependency-tracking
My simple C# ZeroMq app then worked correctly.
Moving on, I then tried to use ZeroMq from inside an iPhone app in the iPhone simulator. I discovered that the iPhone only allows statically linked libraries (no dynamic libraries allowed). This is achieved by changing all the C# wrapper calls to
[DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
and including libzmq.a directly in the MonoTouch project, and setting extra mtouch arguments
-cxx -gcc_flags "-L${ProjectDir} -lzmq -force_load ${ProjectDir}/libzmq.a"
to ensure the ZeroMQ library is included in the iPhone app.
When running the app in the iPhone simulator, it crashed out, which I traced to a call made from a zmq_init() to socketpair. I finally traced this to the ZeroMQ library having been built against my build machine's MacOS headers and libraries, instead of against the iPhone SDK. This was fixed by
./configure CFLAGS="-O -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk" CXXFLAGS="-O -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk" LDFLAGS="-arch i386" --disable-dependency-tracking
Success in the iPhone Simulator! The simulator requires i386 static libraries built to the iPhone simulator SDK. I now can use ZeroMQ functionality within an iPhone app in the Simulator ONLY. It does not work however on a real iPhone.
This is because a real iPhone requires a library that has been built for the ARM architecture, and against the real iPhoneOS SDK.
(There is a side-issue of building 3 separate libraries - i386, ARM6, and ARM7, and combining all 3 into 'fat' library that can be used in any environment. I need to be able to build for ARM before I get to this problem).
** Finally, my question!! **
The last step is to cross-compile build the ZeroMQ library to ARM. I have been trying all day long to come up with the correct switches for this, and studied all the examples on the internet that I can find, but none seem to have a solution that works.
The closest I have got to working is:
./configure CXX=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-g++-4.2
CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2
LD=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ld CFLAGS="-O -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk"
CXXFLAGS="-O -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk"
--disable-dependency-tracking --host=arm-apple-darwin10
LDFLAGS="-isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk"
AR=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar
AS=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/as
LIBTOOL=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool
STRIP=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/strip
RANLIB=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ranlib
This produces a config which make compiles the ZeroMq code, but fails with lots of link errors, e.g.:
ar: libzmq_la-clock.o: No such file or directory
I've tried many other configurations, but they don't even pass ./configure correctly.
Can anyone help me with a suitable ./configure parameter list to produce an ARM architecture static library? This is all I need to get ZeroMQ working on a real iPhone.
And and all help much appreciated!
Just thought I'd share that I found the answer in the end - the trick was to add CPP="cpp" CXXCPP="cpp" to the ./configure statement, giving:
./configure CPP="cpp" CXXCPP="cpp" CXX=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-g++-4.2 CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 LD=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ld CFLAGS="-O -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk" CXXFLAGS="-O -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk" --disable-dependency-tracking --host=arm-apple-darwin10 LDFLAGS="-isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk" AR=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar AS=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/as LIBTOOL=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool STRIP=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/strip RANLIB=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ranlib
I used this configuration to successfully build ZeroMQ for ARM, as used in my new iPhone app I Buzzed First (available at http://itunes.apple.com/gb/app/i-buzzed-first!/id490622820?mt=8 )
That question is not really related to MonoTouch but on how to compile 0MQ on the iOS (ARM). Have a look at: Compile C lib for iPhone
Hopefully it will help you and also cover the next question: fat universal binaries using lipo. The good news is that, if this works on the simulator, then you likely already covered any MonoTouch related issue :-)