Xamarin: Native linking error in fresh installation - firebase

Recently I moved my project to a fresh installation of macOS. I installed Xcode, Visual Studio Mac and Xamarin.iOS, then I retrieved the last build of the project from git server. My configuration is as follows:
macOS Mojave 10.14
Xcode 10.1
Visual Studio for Mac 7.6
Xamarin.iOS 12.2
My problem is that the project no longer builds. I keep getting native linking errors, the build output can be seen below:
/Users/u/Projects/appname/clang: Error: linker command failed with
exit code 1 (use -v to see invocation) (prj)
/Users/u/Projects/appname/error MT5209: Error: warning: directory not
found for option '-FFInstncID-3.2.1/Frameworks' (prj) Native linking
/Users/u/Projects/appname/error MT5209: Error: warning: directory not
found for option '-FFAnlytcs-5.1.4/Frameworks' (prj) Native linking
/Users/u/Projects/appname/error MT5209: Error: warning: directory not
found for option '-FFAnlytcs-5.1.4/Frameworks' (prj) Native linking
/Users/u/Projects/appname/error MT5209: Error: warning: directory not
found for option '-FGAppM-5.1.4/Frameworks' (prj) Native linking
/Users/u/Projects/appname/error MT5209: Error: framework not found
FirebaseInstanceID (prj) Native linking
/Users/u/Projects/appname/MTOUCH: Error MT5201: Native linking failed.
Please review the build log and the user flags provided to gcc: -ObjC
-ObjC -lc++ -lsqlite3 -lz -ObjC -lc++ -lsqlite3 -lz (MT5201) (prj) /Users/u/Projects/appname/MTOUCH: Error MT5202: Native linking failed.
Please review the build log. (MT5202) (prj)
The problem seems to be related to Firebase packages, but I cannot figure out how. Do you have any suggestions?

Related

Cannot install nloptr (R 4.0.3, Ubuntu 20.04)

I tried to install nloptr on R 4.0.3, however I get this error:
/usr/bin/ld: /usr/local/lib/libnlopt.a(general.o): relocation R_X86_64_TPOFF32 against `nlopt_srand_called' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libnlopt.a(mt19937ar.o): relocation R_X86_64_TPOFF32 against `mti' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libnlopt.a(timer.o): relocation R_X86_64_TPOFF32 against `start_inited.4301' can not be used when making a shared object; recompile with -fPIC
collect2: error: ld returned 1 exit status
make: *** [/usr/share/R/share/make/shlib.mk:10: nloptr.so] Error 1
ERROR: compilation failed for package ‘nloptr’
* removing ‘/home/giovanni/R/x86_64-pc-linux-gnu-library/4.0/nloptr’
Warning in install.packages :
installation of package ‘nloptr’ had non-zero exit status
Can someone point me to a solution?
Thanks in advance.
The latest (2.6.2) package of libnlopt-dev is broken in Ubuntu 20, for some reason it is compiled into a static library (.so shared object is missing)
I faced the similar problem a couple of days ago. The quick fix is to download NLOPT fron Github and compile it yourself
https://nlopt.readthedocs.io/en/latest/NLopt_Installation/
At least, it worked for me.
I had a slightly related issue with this package, apt install cmake which was suggested by cli itself fixed the issue.
I also failed to install the nloptr but had another error.
g++: error: nlopt/lib/libnlopt.a: No such file or directory
I followed others suggestion to install the nlopt first as described in nlopt website. The installation process was
mkdir build
cd build
cmake ..
make
sudo make install
But I found the cmake version which nlopt needed should be higher than 3. The default cmake in my computer was version 2.8.12.2 which was /usr/bin/cmake. So I installed cmake version 3.24.2 in my home directory and compiled the nlopt using absolute path of cmake as ~/software/install/cmake-3.24.2-linux-x86_64/bin/cmake ... And I used sudo to install the nlopt in the computer. I could see the libnlopt.so libnlopt.so.0 libnlopt.so.0.11.1 files in /usr/local/lib64
When I went back to install the nloptr in R. It still failed. I found the cmake failure in the output information of installation. So I add the cmake(version 3.24.2) to my PATH in .bashrc file and then I installed the nloptr successfully.

Qt error: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../libGL.so when searching for -lGL

Qt 5.7.0 GCC 4.9.1
I created a simple widget project (no single code written, no settings changed, only drag a few controls to the form) right after installing Qt and did a test compile. I got error messages:
:-1: error: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../libGL.so when searching for -lGL
:-1: error: skipping incompatible /lib/libGL.so when searching for -lGL
:-1: error: skipping incompatible /usr/lib/libGL.so when searching for -lGL
:-1: error: cannot find -lGL
:-1: error: collect2: error: ld returned 1 exit status
I reckon that it was trying to link to the 32 bit OpenGL in my 64 bit machine. /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../libGL.so is indeed located in /usr/lib/libGL. The 64 bit version, I think, is the one in /usr/lib64/libGL. How can I change the linking path so that it will link to the right library?
This seems like you are missing libraries needed to compile 32-bit binaries.
Try running:
sudo yum install glibc-devel.i686 libgcc.i686 libstdc++-devel.i686
this is how I solved this problem.
locate libGL.so and find the right 64 bit version (I used the latest);
create a link in the Qt lib path: ln -s /usr/lib64/libGL.so.352.79 ~/Qt/5.7/gcc_64/lib/libGL.so

native client tutorial can't find libstdc++

I'm new to native client. I'm trying to follow the official tutorial on my newly installed ubuntu 14.
I'm getting the following when running "make serve" under the getting_started folder. I googled, it seems to be related to 32/64 bit. my system is 64bit, but pnacl seems to think it is 32.
Anyway I couldn't find a solution. do you know how?
/media/shi/work/nacl_sdk/pepper_34/toolchain/linux_pnacl/bin/pnacl-clang++ -o hello_tutorial.bc hello_tutorial.cc -O2 -I/media/shi/work/nacl_sdk/pepper_34/include -L/media/shi/work/nacl_sdk/pepper_34/lib/pnacl/Release -lppapi_cpp -lppapi
/media/shi/work/nacl_sdk/pepper_34/toolchain/linux_pnacl/host_x86_32/bin/clang: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
make[1]: * [hello_tutorial.bc] Error 127
make[1]: Leaving directory `/media/shi/work/nacl_sdk/pepper_34/getting_started/part1'
make: * [part1_ALL_TARGET] Error 2
It's probably easiest to install the i386 C/C++ libraries:
sudo apt-get install libc6:i386 libstdc++6:i386
There are 64-bit binaries included in the SDK as well (in toolchain/linux_pnacl/bin64/), but they are not run by default (and I'm not certain of an easy way to make the SDK use them).

Rubymotion ask for Xcode 4.x, but that version is already installed

I tried to ran rake in a rubymotion project and he shows the following error message
ERROR! Xcode 4.x or greater is required
But I have Xcode 4.3.2 installed on my Mac
What can I do?
PD: I installed Xcode 4.4.1 and now the error is this
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36: command not found: /Applications/Xcode 2.app/Contents/Developer/usr/bin/xcodebuild -version
Build ./build/iPhoneSimulator-5.1-Development
sh: /Applications/Xcode: No such file or directory
sh: /Applications/Xcode: No such file or directory
sh: /Applications/Xcode: No such file or directory
Compile ./app/app_delegate.rb
sh: /Applications/Xcode: No such file or directory
rake aborted!
Command failed with status (127): [/Applications/Xcode 2.app/Contents/Develop...]
Tasks: TOP => default => simulator => build:simulator
(See full trace by running task with --trace)
Perhaps you have an old version of Xcode also installed on your system. From the "Getting Started" page on RubyMotion's web site:
If you happened to have an older version of Xcode installed on your machine before you installed a newer Xcode from the App Store, you may want to type the following command in order to properly set up the default Xcode path.
$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

For Ruby on Rails, how to "gem install mysql2" after upgrading from Leopard to Snow Leopard?

It always says:
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
/Users/peter/.rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb
checking for rb_thread_blocking_region()... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
similar things happen if it is sqlite3:
ERROR: Error installing sqlite3:
ERROR: Failed to build gem native extension.
/Users/peter/.rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb
checking for sqlite3.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Update: at least sqlite3 is building now... that is after I rvm remove 1.9.2-p180 and removing all the 1.9.2, and reinstall by rvm install 1.9.2 and now sqlite3 can be bundle installed, but mysql2 still has problem.
I installed the 64 bit version of MySQL server and it will bundle install, and then this question helped with the
Library not loaded: libmysqlclient.18.dylib (LoadError)
solution: Library not loaded: libmysqlclient.16.dylib error when trying to run 'rails server' on OS X 10.6 with mysql2 gem

Resources