07-01-2012 05:17 PM - edited 07-01-2012 05:24 PM
Yes, i have that in my path.
From terminal i can call arm-unknown-nto-qnx6.5.0eabi-gcc , and it respnse there si no input file, so that is in my path, also there is PATH env variable and it has /opt/bbndk-2.1.0-beta1/host/linux/x86/usr/bin which is where arm-unknown-nto-qnx6.5.0eabi-gcc link is.
07-02-2012 12:02 AM - edited 07-02-2012 12:23 AM
I ran this and it gets through configure fine using the 10.0.04 NDK.
./configure --enable-cross-compile --cross-prefix=arm-unknown-nto-qnx8.0.0eabi- --arch=armv7 --enable-debug --disable-optimizations --disable-asm --disable-static --enable-shared --target-os=qnx --disable-ffplay
Here is my .bash_profile env vars for the NDK:
QNX_HOME=/tools/rim/blackberry-10-ndk-10.0.4-beta QNX_TARGET=$QNX_HOME/target/qnx6 QNX_HOST=$QNX_HOME/host/macosx/x86 QNX_CONFIGURATION="/Users/mreed/Applications/Library/Research In Motion/BlackBerry Native SDK" MAKEFLAGS="-I$QNX_TARGET/usr/include" DYLD_LIBRARY_PATH=$QNX_HOME/host/macosx/x86/usr/li b:$DYLD_LIBRARY_PATH PATH=$QNX_HOST/usr/bin:$QNX_HOST/usr/qde/eclipse/j re/bin:$PATH export QNX_TARGET QNX_HOST QNX_CONFIGURATION MAKEFLAGS DYLD_LIBRARY_PATH PATH
After it ran configure I did gnumake and it got pretty far, but failed on ffserver:
ffserver.c: In function 'extract_mpeg4_header': ffserver.c:3565:9: warning: 'av_read_packet' is deprecated (declared at libavformat/avformat.h:1469) [-Wdeprecated-declarations] ffserver.c: In function 'parse_ffconfig': ffserver.c:4501:17: warning: 'luma_elim_threshold' is deprecated (declared at ./libavcodec/avcodec.h:1610) [-Wdeprecated-declarations] ffserver.c:4505:17: warning: 'chroma_elim_threshold' is deprecated (declared at ./libavcodec/avcodec.h:1617) [-Wdeprecated-declarations] ffserver.c: In function 'main': ffserver.c:4686:38: error: 'SA_RESTART' undeclared (first use in this function) ffserver.c:4686:38: note: each undeclared identifier is reported only once for each function it appears in gnumake: *** [ffserver.o] Error 1
After disabling ffserver with --disable-ffserver on configure, it gets through make as well.
07-02-2012 04:57 AM
I give up on this machine, i will try on another one, and with other linux distribution.
Thank you mreed on your help.
07-02-2012 12:53 PM - edited 07-02-2012 12:57 PM
I tried on another machine, installed bbndk 2.0, Ubuntu 11.04, and got exactly same error.
This is absolutely frustrating.
Why is this so annoying, anyone form RIM watching this thread? This is simple compile for third part library and i'm struggling with it few days now. This is not developing, this is nightmare.
I'm author of few Android programms for Playbook, and i tried now to make something on Native, but i give up.
07-02-2012 01:15 PM - edited 07-02-2012 01:17 PM
I'd say try with the 10.0.04 NDK. Even if thats not what you intend to use, you can rule out whether its your machine or if its the 2.1 NDK.
07-03-2012 04:21 PM
Hi,
Please enter the directory where you installed the BBNDK. There you will see a file called bbndk-env.sh. Please issue the following command:
source ./bbndk-env.sh
This will create a set of environment variables that will help you build your software.
Please execute the following command to see the values of the environement variables.
env | grep QNX
You can use these variables when you execute configure.
Hope this helps!
Anthony
07-03-2012 05:23 PM
Thank you Anhu on your advice, but i already did that first. I put source command into my .bashrc and it is executed every time i login. When i do env or printenv i see those variables, QNX_HOST, QNX_TARGET etc and they are pointing to right directory (where bbndk is installed).
07-03-2012 07:06 PM
I hardcoded paths into configure script, and now i'm getting this error:
WARNING: /opt/bbndk-2.1.0-beta1/host/linux/x86/usr/bin/arm-
mktemp -u XXXXXX
XSh7qq
WARNING: Unknown C compiler /opt/bbndk-2.1.0-beta1/host/linux/x86/usr/bin/arm-
check_ld cc
check_cc
BEGIN /tmp/ffconf.WAt7dvBT.c
1 int main(void){ return 0; }
END /tmp/ffconf.WAt7dvBT.c
/opt/bbndk-2.1.0-beta1/host/linux/x86/usr/bin/arm-
arm-unknown-nto-qnx6.5.0eabi-gcc: error: environment variables QNX_HOST and QNX_TARGET not defined
C compiler test failed.
But they are defined, this is response from env | grep QNX:
QNX_CONFIGURATION=/etc/rim/bbndk
CPPFLAGS=-D__PLAYBOOK__ -D__QNXNTO__
QNX_TARGET=/opt/bbndk-2.1.0-beta1/target/qnx6
QNX_HOST=/opt/bbndk-2.1.0-beta1/host/linux/x86
Anyone have a clue what is going on here?
07-07-2012 09:42 AM
I tried with BB 10 and got same errors. When i hardcode path to my compiler, i get errors that i'm missing QNX_HOST and QNX_TARGET variables, so obviously problem is with my environment.
I tried with Ubuntu 11.10 and 11.04 and with no success. If i issue command printenv in terminal, i see that those variables are properly set.
I set my environment by putting "source <path to bbndk-env.sh>" in my bashrc file. Problem is that .configure script cant see those variables, and they are visible through printenv.
Anyone using Ubuntu and successfully compiled something through command line? What i'm doing wrong?
Thx
07-07-2012 02:17 PM
This is absolutely frustrating. Why is this so annoying, anyone form RIM watching this thread? This is simple compile for third part library and i'm struggling with it few days now. This is not developing, this is nightmare.
RIM has nothing to do with this library. C programming let alone cross-compiing *never* was *simple*, all your problems are not because of RIM but because you don't understand what you are doing. If you don't have enough knowledge to compile the library for this platform first of all you should as this library's developers to provide you with proper steps and please note there is no guarantee it'll work out of the box, most probably 'configure' should be modified, probably some changes have to be made to source code too.
So cool down and stop blaming RIM. Nothing personal.
PS: I am not RIM employee