Question

I'm trying to compile this version of Mono (https://github.com/roblillack/mono/tree/qnx-2-10-9) for the emulator of BB OS 10

But i have the nex error:

libmonosgen_2_0_la-mini.lo libmonosgen_2_0_la-method-to-ir.lo libmonosgen_2_0_la-decompose.lo libmonosgen_2_0_la-jit-icalls.lo libmonosgen_2_0_la-trace.lo libmonosgen_2_0_la-dominators.lo libmonosgen_2_0_la-cfold.lo libmonosgen_2_0_la-regalloc.lo libmonosgen_2_0_la-helpers.lo libmonosgen_2_0_la-liveness.lo libmonosgen_2_0_la-ssa.lo libmonosgen_2_0_la-abcremoval.lo libmonosgen_2_0_la-ssapre.lo libmonosgen_2_0_la-local-propagation.lo libmonosgen_2_0_la-driver.lo libmonosgen_2_0_la-debug-mini.lo libmonosgen_2_0_la-linear-scan.lo libmonosgen_2_0_la-aot-compiler.lo libmonosgen_2_0_la-aot-runtime.lo libmonosgen_2_0_la-graph.lo libmonosgen_2_0_la-mini-codegen.lo libmonosgen_2_0_la-mini-exceptions.lo libmonosgen_2_0_la-mini-trampolines.lo libmonosgen_2_0_la-declsec.lo libmonosgen_2_0_la-wapihandles.lo libmonosgen_2_0_la-branch-opts.lo libmonosgen_2_0_la-mini-generic-sharing.lo libmonosgen_2_0_la-regalloc2.lo libmonosgen_2_0_la-tasklets.lo libmonosgen_2_0_la-simd-intrinsics.lo libmonosgen_2_0_la-unwind.lo libmonosgen_2_0_la-image-writer.lo libmonosgen_2_0_la-dwarfwriter.lo libmonosgen_2_0_la-mini-gc.lo libmonosgen_2_0_la-debugger-agent.lo libmonosgen_2_0_la-debug-debugger.lo libmonosgen_2_0_la-xdebug.lo libmonosgen_2_0_la-mini-x86.lo libmonosgen_2_0_la-exceptions-x86.lo libmonosgen_2_0_la-tramp-x86.lo libmonosgen_2_0_la-mini-posix.lo ../../mono/metadata/libmonoruntimesgen.la ../../mono/io-layer/libwapi.la ../../mono/utils/libmonoutils.la -L../../eglib/src -leglib -lm -lsocket /Applications/bbndk/host_10_0_6_1/darwin/x86/usr/bin/ntox86-ld: cannot find -lscreen /Applications/bbndk/host_10_0_6_1/darwin/x86/usr/bin/ntox86-ld: cannot find -lpng14 /Applications/bbndk/host_10_0_6_1/darwin/x86/usr/bin/ntox86-ld: cannot find -lbps /Applications/bbndk/host_10_0_6_1/darwin/x86/usr/bin/ntox86-ld: cannot find -lEGL /Applications/bbndk/host_10_0_6_1/darwin/x86/usr/bin/ntox86-ld: cannot find -lGLESv2 /Applications/bbndk/host_10_0_6_1/darwin/x86/usr/bin/ntox86-ld: cannot find -liconv /Applications/bbndk/host_10_0_6_1/darwin/x86/usr/bin/ntox86-ld: cannot find -lstdc++ collect2: ld returned 1 exit status make[4]: ** [libmonosgen-2.0.la] Error 1 make[4]: Leaving directory `/Users/developer/Desktop/Monoberry/monosrc/mono/mini' make[3]: ** [all] Error 2

My build configuration is the next:

./autogen.sh --prefix=/Users/developer/Desktop/Monoberry/monobuild --with-moonlight=no --with-mcs-docs=no --build=i386-apple-darwin10.7.0 --host=i486-pc-nto-qnx8.0.0 --with-sgen=no --disable-boehm --target=i486-pc-nto-qnx8.0.0

My environment variable are (bbndk-env.sh):

# This script sets environment variables required for this version of NDK
# from the command line. To use the script, you have to "source" it into your shell,
# source bbndk-env.sh
# if source command is not available use "." (dot) command instead
#
#Some influential environment variables in mono are:
#  CC          C compiler command  -->Done
#  CFLAGS      C compiler flags --> Done
#  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
#              nonstandard directory <lib dir> -->Done
#  LIBS        libraries to pass to the linker, e.g. -l<library> --> Not set
#  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if -->Done
#              you have headers in a nonstandard directory <include dir>
#  CXX         C++ compiler command --> Done
#  CXXFLAGS    C++ compiler flags -->Done
#  CCAS        assembler compiler command (defaults to CC) -->Done
#  CCASFLAGS   assembler compiler flags (defaults to CFLAGS) -->Done
#  CPP         C preprocessor -->Done
#  CXXCPP      C++ preprocessor -->Done
#  XMKMF       Path to xmkmf, Makefile generator for X Window System -->Not set

QNX_TARGET="/Applications/bbndk/target_10_0_6_384/qnx6"
QNX_HOST="/Applications/bbndk/host_10_0_6_1/darwin/x86"
QNX_CONFIGURATION="/Users/developer/Library/Research In Motion/BlackBerry Native SDK"
MAKEFLAGS="-I$QNX_TARGET/usr/include"
DYLD_LIBRARY_PATH="$QNX_HOST/usr/lib/:$QNX_TARGET/../darwin/x86/usr/lib/qt4/lib:$DYLD_LIBRARY_PATH"
PATH="$QNX_HOST/usr/bin:$PATH"

#armv7
#RANLIB="${QNX_HOST}/usr/bin/ntoarmv7-ranlib "
#x86 emulator
RANLIB="${QNX_HOST}/usr/bin/ntox86-ranlib "

#armv7
#CPP="${QNX_HOST}/usr/bin/qcc -V4.6.3,gcc_ntoarmv7le_cpp -E "
#x86
CPP="${QNX_HOST}/usr/bin/qcc -V4.6.3,gcc_ntox86_cpp -E "

#armv7
#CXXCPP="${QNX_HOST}/usr/bin/qcc -V4.6.3,gcc_ntoarmv7le_cpp -E "
#x86
CXXCPP="${QNX_HOST}/usr/bin/qcc -V4.6.3,gcc_ntox86_cpp -E "

#armv7
#CC="${QNX_HOST}/usr/bin/qcc -V4.6.3,gcc_ntoarmv7le_cpp "
#x86
CC="${QNX_HOST}/usr/bin/qcc -V4.6.3,gcc_ntox86_cpp "

#armv7
#CXX="${QNX_HOST}/usr/bin/qcc -V4.6.3,gcc_ntoarmv7le_cpp "
#x86
CXX="${QNX_HOST}/usr/bin/qcc -V4.6.3,gcc_ntox86_cpp "

#armv7
#LD="${QNX_HOST}/usr/bin/ntoarmv7-ld "
#x86
LD="${QNX_HOST}/usr/bin/ntox86-ld "

CPPFLAGS="-D__PLAYBOOK__ -D__QNXNTO__ "
CFLAGS=" -g "
CXXFLAGS=" -g "
CCAS=$CC
CCASFLAGS=$CFLAGS

#armv7
#LDFLAGS="-L${QNX_TARGET}/armle-v7/lib -L${PREFIX}/lib -lscreen -lasound -lpps -lm -lpng14 -lbps -lEGL -lGLESv2"
#x86
LDFLAGS="-L${QNX_TARGET}/x86/lib -L${PREFIX}/lib -lscreen -lasound -lpps -lm -lpng14 -lbps -lEGL -lGLESv2"

export QNX_TARGET QNX_HOST QNX_CONFIGURATION MAKEFLAGS DYLD_LIBRARY_PATH PATH RANLIB CPP CC LD CPP CPPFLAGS CFLAGS LDFLAGS

Anyone knows what i'm doing bad?? please, i'm stuck with this problem for a long time!

P.S.My OS is: Mac OS X 10.6.8

Was it helpful?

Solution

The solution was very simple, i was setting bad the environment variable, LDFLAGS. The correct value of the variable is:

LDFLAGS="-L${QNX_TARGET}/x86/lib -L${QNX_TARGET}/x86/usr/lib -L${QNX_TARGET}/x86/lib/gcc/4.6.3 -liconv -lstdc++"

The library iconv is located in {QNX_TARGET}/x86/usr/lib and stdc++ in {QNX_TARGET}/x86/lib/gcc/4.6.3

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top