MonoTouch: "file too small for architecture i386" -- FlurryAnalytics.dll - xamarin.ios

I added the FlurryAnalytics.dll from the mono-monotouch-bindings project in GitHub. But when I compile I get this compiler error that is a big baffling.
/var/folders/15/47k2732n643g9dcrz5sncc6c0000gn/T/tmp30974428.tmp/
libFlurryAnalytics.a, file too small for architecture i386
collect2: ld returned 1 exit status
Any way around this?

The current library was incorrectly built. I will push the correct version tonight.
In the meantime, add libFlurryAnalytics.a back to the directory and run the makefile using the make command. You can find libFlurryAnalytics.a from the SDK Download Provided by Flurry.

Related

Linux randomly deleted my file while compiling what do I do?

gcc -L/root/Desktop - Wall -o prog3.c -pthread -lcopy
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/Scrt1.0: In function '_start': (.text+0x20): undefined reference to 'main'
collect2: error: ld returned 1 exit status
This is my error code. prog3.c is nowhere to be found, what on earth happened is there any way to get my file back?? The bold is the command I ran and the rest is the resultant console output
Your problem is here: -o prog3.c. gcc’s -o option is used to tell gcc which name it should give to the executable it generates. So here, you’re basically asking your compiler to replace your prog3.c source file by an executable. Sadly your code is gone...
Little addendum of your options in such scenario:
It was Git (or any other version control) repository. In such case, you can simply bring it from previous commit
Your editor/IDE has some back-up system. Sometimes I need to bring back a file I've thought was needless. For such case, my favourite text editor should have create already back-up file in appropriate location (e.g. $XDG_DATA_HOME/vim/backup in my case).
If none of above, but you still have previously correctly compiled binary file
You can try to decompile, but this process - even if successful - isn't lossless (e.g. code is basically spaghetti).
Had you compiled with -g flag, you could possibly retrieve the code from debug info.
You can at least de-assemble to Assembly code.

Undefined reference under WinMain#16 in cygwin

i am new to stackflow and i previously i have no background in computer system and programming. However, now i need to run analysis under cygwin for my bioinformatics project. I encounter some error when i try to compile a file name 'zone_b.linux'using cygwin, to produce an executable program. The linux file is download from web https://github.com/haddocking/HADDOCK-binding-sites-tutorial/blob/master/ana_scripts/zone_b.linux. When i try to compile using the following command under cygwin it produce the following error:
$ gcc zone_b.linux
/usr/lib/gcc/i686-pc-cygwin/6.4.0/../../../libcygwin.a(libcmain.o): In
function `main':
/usr/src/debug/cygwin-2.9.0-3/winsup/cygwin/lib/libcmain.c:37: undefined
reference to `WinMain#16'
collect2: error: ld returned 1 exit status
Error description
I search the following error under stackoverflow, and i found two post with similar problem.
First is the post from undefined reference to `WinMain#16'. It stated that the problem is due the Microsoft'linker uses a runtime library entry point(winMainCRTStartup) that calls Microsoft's non-standard WinMain instead of standard main. So, i try the post's suggestion of including the entry by following command
$ gcc zone_b.linux /entry:winMainCRTStartup
gcc: error: /entry:winMainCRTStartup: No such file or directory
However i get the error no such file or directory. I think maybe it is because i am running under cygwin not mingW.
Second post is the Undefined reference to WinMain in Cygwin. From the post, it said use -c compile flag to only produce object file. However, for my case, i am not using any -c. Therefore, i think it is not relevant to my issue.
I would appreciate if anyone could kindly explain to me since i am new to this computing area. Thank you.
zone_b.linux is the compiled and linked executable program to run on a linux machine. It is a 32-bit ELF binary file. It will not work on a Windows machine, even using cygwin or mingw32, without re-compulation.
You probably have to compile zone_b.f, a FORTRAN source file, using the gfortran compiler to create a zone_b.exe that is usable in cygwin. I saw no instructions for this, but try something like gcc zone_b.f and cross fingers. Be sure gfortran is installed using cygwin setup.
You will also need to (re-)build the other executables (cluster_struc and contact) by performing make in the ana_scripts directory. Any supplied executables (from the git clone ... or a downloaded .zip file) will not work under cygwin.
You will need to have perl and python installed. I think perl is installed by default. You can install python2 using cygwin setup. The python script looked like it will work with python2 or python3, whichever is the default. On cygwin, today, python2 is the default python. I don't do perl, so cross your fingers.

CMake link OpenBLAS shared library illegal instruction

I have a question about using CMake to link the shared library.
After building OpenBLAS from source and install it succesfully.
In /opt/OpenBLAS/include has header files and
in /opt/OpenBLAS/lib has shared and static libraries.
If I have a toy program call cpp_gemm.cpp, I can build it by typing
g++ -o cpp_gemm cpp_gemm.cpp -I/opt/OpenBLAS/include -L/opt/OpenBLAS/lib -lopenblas
And execute it without error message.
But I want to use CMake to build it, so I write following rules in CMakeLists.txt
cmake_minimum_required(VERSION 2.8.4)
project(CppGEMM)
include_directories(/opt/OpenBLAS/include)
link_directories(/opt/OpenBLAS/lib)
add_executable(cpp_gemm cpp_gemm.cpp)
target_link_libraries(cpp_gemm openblas)
After I create build folder and enter into it, I type
cmake ..
make
to build the program successfully.
But I will get
Illegal instruction (core dumped)
after execute it.
After searching the related problems by Google search, I found that
replace
link_directories(/opt/OpenBLAS/lib)
with
link_directories(/opt/OpenBLAS)
can solve my problem.
That is, I can build the program successfully and execute it without the
error message.
I'm confused, but I can not find any material to realize it.
Can anyone tell me why this occurred?
Many thanks!

Cross Compilation of OpenCV for ARM fails

I am following this site to compile OpenCV for ARM.
It could not find my compiler so i hardcoded it into cmake file
find_program(CMAKE_C_COMPILER NAMES arm-linux-gnueabi-gcc-4.7)
find_program(CMAKE_CXX_COMPILER NAMES arm-linux-gnueabi-g++-4.7)
set(ARM_LINUX_SYSROOT /usr/arm-linux-gnueabi CACHE PATH "ARM cross compilation system root")
It compiles to aproximately 50% and then throws the following error:
Linking CXX shared library ../../lib/libopencv_viz.so
/usr/lib/libvtkCharts.so.5.8.0: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
I am not every experienced in cross compilation (or straight compilation for the matter). How do i fix this?
I think it is a mismatch between libopencv_viz and libvtkCharts. Some of your 3rdparty libs are built for another platform. These libraries themselves must be recompiled from source to match the details (ABI, dynamic system library dependencies, etc) of the system on which they are intended to be used.
Compiling OpenCV 2.4.10 worked for me. I did not have any preferred version. If you want to compile v3.0 see #Kornel's answer, that suggests to leave viz library out of compilation.
Use this command to checkout v2.4.10
git checkout 2.4.10

AArch64 support in cmake 2.8.11

I have installed cmake 2.8.11 and now trying to build llvm with cmake. however I am getting the following build error
Scanning dependencies of target LLVMAArch64Utils
make[2]: *** No rule to make target `lib/Target/AArch64/AArch64GenSubtargetInfo.inc', needed by `lib/Target/AArch64/Utils/CMakeFiles/LLVMAArch64Utils.dir/AArch64BaseInfo.cpp.o'.
Stop.
Does this mean that cmake does not have support for 64-bit architectire? If so, can someone tell me an easy way to add AArch64 patch to cmake 2.8.11.
This seems like a bug in build script.
See this LLVM team bug tracker item.
Tim Northover 2013-07-14 15:57:50 CDT Hi Ray,
I think this has been fixed in r182190, which unfortunately just
missed the 3.3 release itself. I'm now trying to get it into the minor
release we're trying to make.
I'll leave this open, and assigned to me (as a reminder) until that
happens.
Thanks for taking the time to report it, and I'm sorry you had to.
Tim.

Resources