Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Contributor
Posts: 22
Registered: ‎02-02-2012
My Device: none
My Carrier: none
Accepted Solution

Promlems with installing SDL in Blackberry IDE

Hi,

I'm pretty new to bleckberry and I'm getting following when i try to run the build_for_playbook.sh script:

## ----------- ##
## Core tests. ##
## ----------- ##

configure:2872: checking for arm-unknown-nto-qnx6.5.0eabi-gcc
configure:2899: result: /opt/RIM/bbndk/host/linux/x86/usr/bin/qcc -V4.4.2,gcc_ntoarmv7le_cpp 
configure:3168: checking for C compiler version
configure:3177: /opt/RIM/bbndk/host/linux/x86/usr/bin/qcc -V4.4.2,gcc_ntoarmv7le_cpp  --version >&5
cc: unknown option: '--version'
configure:3188: $? = 1
configure:3177: /opt/RIM/bbndk/host/linux/x86/usr/bin/qcc -V4.4.2,gcc_ntoarmv7le_cpp  -v >&5
cc: looking for gcc_ntoarmv7le_cpp in /opt/RIM/bbndk/host/linux/x86/etc/qcc/gcc/4.4.2/gcc_ntoarmv7le_cpp++.conf
cc: looking for gcc_ntoarmv7le_cpp in /opt/RIM/bbndk/host/linux/x86/etc/qcc/gcc/4.4.2/gcc_ntoarmv7le_cpp.conf
cc: no files to process
configure:3188: $? = 1
configure:3177: /opt/RIM/bbndk/host/linux/x86/usr/bin/qcc -V4.4.2,gcc_ntoarmv7le_cpp  -V >&5
cc: no targets defined in /opt/RIM/bbndk/host/linux/x86/etc/qcc/gcc/4.4.2/4.4.2!
configure:3188: $? = 0
configure:3177: /opt/RIM/bbndk/host/linux/x86/usr/bin/qcc -V4.4.2,gcc_ntoarmv7le_cpp  -qversion >&5
cc: unknown option: '-qversion'
configure:3188: $? = 1
configure:3208: checking whether the C compiler works
configure:3230: /opt/RIM/bbndk/host/linux/x86/usr/bin/qcc -V4.4.2,gcc_ntoarmv7le_cpp   -g  -D__PLAYBOOK__ -D__QNXNTO__ -I /home/boris/SDL/../TouchControlOverlay/public  -L/home/boris/SDL/../TouchControlOverlay/Device-Debug -lTouchControlOverlay -L/opt/RIM/bbndk/target/qnx6/armle-v7/lib -L/home/boris/SDL/playbook_prefix/lib -lscreen -lasound -lpps -lm -lpng14 -lbps -lxml2 -lEGL -lGLESv2 conftest.c  >&5
/home/boris/SDL/../TouchControlOverlay/Device-Debug/libTouchControlOverlay.so: undefined reference to `navigator_get_domain'
/home/boris/SDL/../TouchControlOverlay/Device-Debug/libTouchControlOverlay.so: undefined reference to `screen_get_domain'
cc: /opt/RIM/bbndk/host/linux/x86/usr/bin/ntoarm-ld error 1
configure:3234: $? = 1
configure:3272: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:3277: error: in `/home/boris/SDL':
configure:3279: error: C compiler cannot create executables
See `config.log' for more details

I don't know what I'm doing wrong. Thanks in advance.

Developer
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: Promlems with installing SDL in Blackberry IDE

/home/boris/SDL/../TouchControlOverlay/Device-Debug/libTouchControlOverlay.so: undefined reference to `navigator_get_domain'
/home/boris/SDL/../TouchControlOverlay/Device-Debug/libTouchControlOverlay.so: undefined reference to `screen_get_domain'

What version of NDK?

Contributor
Posts: 22
Registered: ‎02-02-2012
My Device: none
My Carrier: none

Re: Promlems with installing SDL in Blackberry IDE

1.0

Developer
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: Promlems with installing SDL in Blackberry IDE

No idea why you are getting this error, both functions should be defined in libbps which is used in qcc command line...

Contributor
Posts: 22
Registered: ‎02-02-2012
My Device: none
My Carrier: none

Re: Promlems with installing SDL in Blackberry IDE

I have imported the whole SDL directory to NDK and compiled there - everything looks fine.

BlackBerry Development Advisor
Posts: 38
Registered: ‎10-26-2011
My Device: BlackBerry Bold 9900
My Carrier: Rogers

Re: Promlems with installing SDL in Blackberry IDE


boris812 wrote:

1.0


For NDK 1.0 you need to pick up libbps and its headers from target-override. You will also need to package libbps.so.1 in your bar file.  Note that this should not be done for NDK 2.

 

Add the following path to your include parameters (-I):

 

$QNX_TARGET/../target-override/usr/include

Add the following path to your libpath parameters (-L):

 

$QNX_TARGET/../target-override/$CPUVARDIR/usr/lib

where $CPUVARDIR is either x86 or armle-v7 depending on whether you are building for Simulator or Device. CPUVARDIR is a makefile variable in the QNX recursive Makefile system, which I don't think you are using.

 

Add the following to your bar-descriptor.xml:

 

<asset path="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib/libbps.so" type="Qnx/Elf">lib/libbps.so.1</asset>

If or when you upgrade to NDK 2, you will need to remove that line from the bar-descriptor.xml.  The additions to include and lib paths are harmless in NDK 2.

 

 

 

 

 

 

 

Developer
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: Promlems with installing SDL in Blackberry IDE

jhoffmann, could you clarify please?

target/qnx6/armle-v7/lib

you are saying that libraries should be taken from

/target-override/armle-v7/usr/lib

what is the difference? nad why SDL i GitHUB references the first (wrong) library path?

Thanks.

BlackBerry Development Advisor
Posts: 38
Registered: ‎10-26-2011
My Device: BlackBerry Bold 9900
My Carrier: Rogers

Re: Promlems with installing SDL in Blackberry IDE


BGmot wrote:

jhoffmann, could you clarify please?

target/qnx6/armle-v7/lib

you are saying that libraries should be taken from

/target-override/armle-v7/usr/lib

what is the difference? nad why SDL i GitHUB references the first (wrong) library path?

Thanks.


You need both locations for NDK 1.  "target" is what's on device, "target-override" is more stuff you need.  In NDK 2 libbps moved to be on device and so no longer appears in target-override.

Developer
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: Promlems with installing SDL in Blackberry IDE

Forgive me my ignorance but I am afraid I am still a bit confused and want to understand this for myself. What difference does it make that libbso was moved to device in 2.0 if we are talking about compiling/linking time. If we forget for a while  about device at all and concentrate on linkage process which happens on dev host:

/home/boris/SDL/../TouchControlOverlay/Device-Debug/libTouchControlOverlay.so: undefined reference to `navigator_get_domain'
/home/boris/SDL/../TouchControlOverlay/Device-Debug/libTouchControlOverlay.so: undefined reference to `screen_get_domain'

these particular linker errors are saying that linker can not find functions definitions in any .o file or library supplied via -l (it's little L).

So in 2.0 we should not supplly -lbps, so where are these functions defined?

Thanks for your patience and time...

BlackBerry Development Advisor
Posts: 38
Registered: ‎10-26-2011
My Device: BlackBerry Bold 9900
My Carrier: Rogers

Re: Promlems with installing SDL in Blackberry IDE

There is an old version of libbps in target that should not be used.  If you don't specify target-override in all your projects, then it might pick up the one in target and thus you get these undefined references.

 

In 2.0 you should still specify -lbps.  What you don't need is -I.../target-override/... and -L.../target-override/...