Error in cross compiling mono for arm [duplicate] - mono

This question already has answers here:
Cannot cross-compile Mono for ARM [duplicate]
(2 answers)
Cross-compiling mono for proprietary ARM device
(1 answer)
Closed 8 years ago.
I m trying to cross compile mono for arm architecture with help of scratchbox2 in Ubuntu 12.04 LTS operating system but failed to do so.
The whole process I did is given below
A. Setting Up scratchbox2
Clone the scratchbox 2 repository:
$ git clone git://gitorious.org/scratchbox2/scratchbox2.git
To build and install SB2:
$ cd scratchbox2
$ dpkg-buildpackage -rfakeroot
$ cd ..
$ sudo dpkg -i libsb2*deb scratchbox2*deb
Status: successful
B. Setting up qemu
Clone the qemu repository
git clone git://git.qemu.org/qemu.git
To build and install qemu
$ cd qemu
$ ./configure --prefix=$HOME/sb2 --target-list=arm-linux-user
$ make && make install
$ cd ..
Status: successful
C. Setting up arm tool chain
Getting the arm tool chain
$ wget https://sourcery.mentor.com/sgpp/lite/arm/portal/package8739/public/arm-none-linux-gnueabi/arm-2011.03-41-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
$ tar xjvf arm-2011.03-41-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
Generating a working target configuration.
$ cp -a arm-2011.03/arm-none-linux-gnueabi/libc/{lib,etc,usr} .
$ sb2-init ARM9 arm-2011.03/bin/arm-none-linux-gnueabi-gcc [ ARM9-> name of target]
Status: successful
D. Cross compiling mono
$ sb2
[SB2 simple arm9] root#Vostro-460 $ cd Desktop/mono-2.10.8.1
[SB2 simple arm9] root#Vostro-460 mono-2.10.8.1 $ ./configure --disable-mcs-build
[SB2 simple arm9] root#Vostro-460 mono-2.10.8.1 $ make
Status: failed
Error:
/usr/local/lib/libgmodule-2.0.so: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make[4]: *** [test-glib] Error 1
make[4]: Leaving directory `/home/ushus/Desktop/mono-2.10.8.1/eglib/test'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/ushus/Desktop/mono-2.10.8.1/eglib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/ushus/Desktop/mono-2.10.8.1/eglib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ushus/Desktop/mono-2.10.8.1'
make: *** [all] Error 2
I am stuck in this step. Any idea how to solve this error?

Related

failed to install it on Ubuntu 22.04, with gcc-11.2

all:
I successfully configured and built gdal-3.4.3, but failed to install it on Ubuntu 22.04, with gcc-11.2,
My ENV:
➜ ~ uname -r
5.15.0-27-generic
➜ ~ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04 LTS
Release: 22.04
Codename: jammy
➜ ~ gcc --version
gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
my installation outcome:
Installing with make install...
========================= Installation results ===========================
/usr/local/bin/cmake -S....../GDAL -B....../GDAL/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/local/bin/cmake -E cmake_progress_start ....../GDAL/build/CMakeFiles ....../GDAL/build//CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '....../GDAL/build'
make -f CMakeFiles/generate_gdal_version_h.dir/build.make CMakeFiles/generate_gdal_version_h.dir/depend
make[2]: Entering directory '....../GDAL/build'
cd ....../GDAL/build && /usr/local/bin/cmake -E cmake_depends "Unix Makefiles" ....../GDAL ....../GDAL ....../GDAL/build ....../GDAL/build ....../GDAL/build/CMakeFiles/generate_gdal_version_h.dir/DependInfo.cmake --color=
make[2]: Leaving directory '....../GDAL/build'
make -f CMakeFiles/generate_gdal_version_h.dir/build.make CMakeFiles/generate_gdal_version_h.dir/build
make[2]: Entering directory '....../GDAL/build'
/usr/local/bin/cmake -DSOURCE_DIR=....../GDAL -DBINARY_DIR=....../GDAL/build -DGDAL_SHA1SUM= -DGDAL_RELEASE_DATE= -P ....../GDAL/cmake/helpers/generate_gdal_version_h.cmake
-- Found Git: /usr/bin/git (found version "2.34.1")
CMake Error at ....../GDAL/cmake/helpers/generate_gdal_version_h.cmake:27 (string):
string sub-command SUBSTRING requires four arguments.
make[2]: *** [CMakeFiles/generate_gdal_version_h.dir/build.make:73: CMakeFiles/generate_gdal_version_h] Error 1
make[2]: Leaving directory '....../GDAL/build'
make[1]: *** [CMakeFiles/Makefile2:4367: CMakeFiles/generate_gdal_version_h.dir/all] Error 2
make[1]: Leaving directory '....../GDAL/build'
make: *** [Makefile:149: all] Error 2
**** Installation failed. Aborting package creation.
Restoring overwritten files from backup...OK
Cleaning up...OK
Bye.
Actually, line 27 of file ....../GDAL/cmake/helpers/generate_gdal_version_h.cmake is string(SUBSTRING ${GDAL_GIT_HASH} 0 10 REV), it looks okay to me...
Did anybody meet the same issue?

Unable to compile Riak on Raspberry Pi 3

currenty I'm trying to install Riak on the Raspberry Pi 3 for testing purposes. I used the following instruction from basho:
http://docs.basho.com/riak/kv/2.2.2/setup/installing/source/
I'm having problems compiling it from source. I tried to compile it on Raspbian Jessie and then switched to Ubuntu Server 16.04. Both times with the same result. It is not compiling and aborts at a certain point. I don't know what causes the problem since it only says: recipe for target 'util/perf_count.o' failed. Searching Google and the mailing list from basho weren't successful.
The version of gcc is gcc (Raspbian 4.9.2-10) 4.9.2. The version of Erlang is Erlang R16B02_basho8 (erts-5.10.3)
The commands i used are the following:
Installing Erlang:
wget http://s3.amazonaws.com/downloads.basho.com/erlang/otp_src_R16B02basho10.tar.gz
tar zxvf otp_src_R16B02-basho10.tar.gz
cd OTP_R16B02_basho10
./otp_build autoconf
./configure && make && sudo make install
Installing Riak:
wget http://s3.amazonaws.com/downloads.basho.com/riak/2.2/2.2.1/riak-2.2.1.tar.gz
tar zxvf riak-2.2.1.tar.gz
cd riak-2.2.1
make locked-deps
make rel
Any suggestions are welcome.
Output:
`./include/leveldb/atomics.h:155:15: note:
template argument deduction/substitution failed util/perf_count.cc:439:40:
note: deduced conflicting types for parameter ‘ValueT’
(‘unsigned int’ and‘int’ add_and_fetch(ptr_32, 1);`
`Makefile:190: recipe for target 'util/perf_count.o' failed
make[1]: *** [util/perf_count.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/pi/Riak/riak/deps/eleveldb/c_src/leveldb'
ERROR: Command [compile] failed!
Makefile:23: recipe for target 'compile' failed
make: *** [compile] Error 1`
After digging deeper I got some help from Basho's mailing list (many thanks).
The Link below shows the steps to solve this problem:
http://lists.basho.com/pipermail/riak-users_lists.basho.com/2017-April/019187.html
The next link is a detailed instruction, which helps to install Riak on the Raspberry Pi 3:
http://docs.basho.com/riak/kv/2.2.2/setup/installing/source/

Mono make fails on OS X 10.8.3 due to submodule update failure

After checking out Mono source from github and running ./autogen.sh --prefix=/usr/local with an environment MDK and monolite are installed, I tried to make, then I got the following error:
make[4]: Nothing to be done for `all-am'.
make[3]: Nothing to be done for `all-am'.
Making all in runtime
if test -w /Users/alp/workspace/mono/mcs; then :; else chmod -R +w /Users/alp/workspace/mono/mcs; fi
cd /Users/alp/workspace/mono/mcs && make --no-print-directory -s NO_DIR_CHECK=1 PROFILES=' net_2_0 net_3_5 net_4_0 net_4_5 ' CC='gcc' all-profiles
-n Bootstrap compiler:
Mono C# compiler version 2.10.11.0
make[7]: *** No rule to make target `../../external/ikvm/reflect/*.cs', needed by `../class/lib/basic/basic.exe'. Stop.
make[6]: *** [do-all] Error 2
make[5]: *** [all-recursive] Error 1
make[4]: *** [profile-do--basic--all] Error 2
make[3]: *** [profiles-do--all] Error 2
make[2]: *** [all-local] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
It was because external/ikvm was empty. So I ran git submodule init, it was successful, then I tried git submodule update --recursive. That's when I got the error:
fatal: Needed a single revision
Unable to find current revision in submodule path 'external/Lucene.Net'
If I run git submodule a minus appears on all submodules except Lucene.Net:
$ git submodule
88fb67b07621dfed054d8d75fd50672fb26349df external/Lucene.Net
-471c3e0803a9f40a0acc8aeceb31de6ff93a52c4 external/Newtonsoft.Json
-e77b12e6cc5ed260a98447f609e887337e44e299 external/aspnetwebstack
-fc76b93e3e0064b2d751796878f9cbe88df1d5f4 external/cecil
...
Why git submodule update is giving me this error?
This should work:
rm -Rf external/Lucene.Net/
git submodule init
git submodule update

installing WordNet on Mac

I'm trying to install Wordnet 3.0 on my Mac which is OSX 10.8.
I've configured it, but when I try make,
I get a bunch of errors...
.....
/usr/include/tkDecls.h:1692: error: expected specifier-qualifier-list before ‘XColor’
make[2]: *** [wishwn-tkAppInit.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
and then if I proceed with make install
Making install in doc
Making install in html
make[3]: Nothing to be done for `install-exec-am'.
test -z "/usr/local/WordNet-3.0/doc/html" || /Users/ravenyj/Desktop/WordNet-3.0/install-sh -d "/usr/local/WordNet-3.0/doc/html"
mkdir: /usr/local/WordNet-3.0: Permission denied
make[3]: *** [install-htmlDATA] Error 1
make[2]: *** [install-am] Error 2
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1
I have not made any modification to Makefile, and don't know if I should.
Could anyone please help me out on this?
Using brew is orders of magnitude simpler. Just:
brew install wordnet
The following worked for me to get it to compile:
./configure CFLAGS="-I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -fpermissive" CC=/usr/bin/gcc
then
make
sudo make install
after that it's showing up fine for me in
/usr/local/WordNet-3.0/
I then added WordNet to my $PATH by editing my .bash_profile file, adding the line:
export PATH=/usr/local/WordNet-3.0/bin:$PATH
opening a new Terminal window, I could then type:
$ wn
and see that it's now working fine
Do the following to install WordNet in fastest manner:
Press Command+Space and type Terminal and press enter/return key.
Run in Terminal app:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
...and press enter/return key. Wait for the command to finish.
Run:
brew install wordnet
After installation use 'wn' command in terminal to access the application.
I had the same problem too until I saw this webpage: http://ticanchang.blogspot.com/2010/04/install-wordnet-in-mac.html
In the folder of your downloaded WordNet package, type:
./configure
make
sudo make install
You need to include "sudo" because normally a user do not have the permission to update the /usr/local folder.

unable to compile pacman(ArchLinux package manager) in ubuntu

I have tried to do the Offline Installation as described in the ArchLinux wiki, but it did not worked out as i have mentioned in the thread https://stackoverflow.com/posts/comments/12588344. Hence i have planned to compile the pacman in a machine which has internet connection and then download the packages using the compiled pacman binary and then transfer it to offline ArchLinux Machine.
While i tried to compile the pacman in Ubuntu-11.10 machine i got the following errors
$ make # after ./autogen.sh && ./configure
make all-recursive
make[1]: Entering directory `/home/talespin/archlinux/pacman'
Making all in lib/libalpm
make[2]: Entering directory `/home/talespin/archlinux/pacman/lib/libalpm'
Making all in po
make[3]: Entering directory `/home/talespin/archlinux/pacman/lib/libalpm/po'
test ! -f ./libalpm.pot || \
test -z "ca.gmo cs.gmo da.gmo de.gmo el.gmo en_GB.gmo es.gmo fi.gmo fr.gmo hu.gmo it.gmo kk.gmo lt.gmo nb.gmo pl.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo sk.gmo sr.gmo sr#latin.gmo sv.gmo tr.gmo uk.gmo zh_CN.gmo zh_TW.gmo" || make ca.gmo cs.gmo da.gmo de.gmo el.gmo en_GB.gmo es.gmo fi.gmo fr.gmo hu.gmo it.gmo kk.gmo lt.gmo nb.gmo pl.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo sk.gmo sr.gmo sr#latin.gmo sv.gmo tr.gmo uk.gmo zh_CN.gmo zh_TW.gmo
make[4]: Entering directory `/home/talespin/archlinux/pacman/lib/libalpm/po'
: --update --lang=ca ca.po libalpm.pot
rm -f ca.gmo && : -c --statistics --verbose -o ca.gmo ca.po
mv: cannot stat `t-ca.gmo': No such file or directory
make[4]: *** [ca.gmo] Error 1
make[4]: Leaving directory `/home/talespin/archlinux/pacman/lib/libalpm/po'
make[3]: *** [stamp-po] Error 2
make[3]: Leaving directory `/home/talespin/archlinux/pacman/lib/libalpm/po'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/talespin/archlinux/pacman/lib/libalpm'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/talespin/archlinux/pacman'
make: *** [all] Error 2
I have cloned the source from git://projects.archlinux.org/pacman.git and tried compiling with the commit e6f72c61a098b52ea29e54b8eb4739a2ff81e6b0 and its parents(until commit ae25167bcd592186749b79ea31b10fb78ed9fb2d) with no success.
Solved as explained in the mailing list http://mailman.archlinux.org/pipermail/pacman-dev/2012-March/015341.html
Used the git commit e6f72c61a098b52ea29e54b8eb4739a2ff81e6b0in
repo git://projects.archlinux.org/pacman.git
1) $ git clean -xfd; ./autogen.sh && ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
--enable-git-version --enable-debug --without-gpgme
2) cd lib/libalpm
3) In the Makefile replace line
LIBS = -lssl -larchive -lm
with
LIBS = -lssl -larchive -lm -lcrypto
4) cd ../../ && make