I have been trying to compile the latest osmocom-bb build target binaries directly on my Freerunner, which is running Om2008.8.
uname -a // Linux om-gta02 2.6.28-rc4 #1 PREEMPT Mon Mar 2 19:43:22 CET 2009 armv4tl unknown
Unfortunately, I am getting an error during compilation in:
directory // `/src/shared/libosmocore/build-target/src'
GCC output:
make[3]: Entering directory `/home/root/osmocom/src/shared/libosmocore/build-target/src' make: *** [shared/libosmocore/build-target/src/.libs/libosmocore.a] Error 2
Making all in . make[4]: Entering directory `/home/root/osmocom/src/shared/libosmocore/build-target/src' CC gsmtap_util.lo In file included from ../../src/gsmtap_util.c:37: /usr/include/netinet/in.h:365: error: expected declaration specifiers or '...' before '(' token
-sh: syntax error: "(" unexpected root@om-gta02 ~/osmocom/src $ /usr/include/netinet/in.h:365: error: expected ')' before '?' token -sh: /usr/include/netinet/in.h:365:: not found root@om-gta02 ~/osmocom/src $ /usr/include/netinet/in.h:366: error: expected declaration specifiers or '...' before '(' token -sh: /usr/include/netinet/in.h:366:: not found root@om-gta02 ~/osmocom/src $ /usr/include/netinet/in.h:366: error: expected ')' before '?' token -sh: /usr/include/netinet/in.h:366:: not found root@om-gta02 ~/osmocom/src $ /usr/include/netinet/in.h:368: error: expected declaration specifiers or '...' before '(' token -sh: /usr/include/netinet/in.h:368:: not found root@om-gta02 ~/osmocom/src $ /usr/include/netinet/in.h:368: error: expected ')' before '?' token -sh: /usr/include/netinet/in.h:368:: not found root@om-gta02 ~/osmocom/src $ /usr/include/netinet/in.h:370: error: expected declaration specifiers or '...' before '(' token -sh: /usr/include/netinet/in.h:370:: not found root@om-gta02 ~/osmocom/src $ /usr/include/netinet/in.h:370: error: expected ')' before '?' token -sh: /usr/include/netinet/in.h:370:: not found root@om-gta02 ~/osmocom/src $ ../../src/gsmtap_util.c: In function 'gsmtap_fd_cb': -sh: ../../src/gsmtap_util.c:: not found root@om-gta02 ~/osmocom/src $ ../../src/gsmtap_util.c:155: warning: implicit declaration of function 'perror' -sh: ../../src/gsmtap_util.c:155:: not found root@om-gta02 ~/osmocom/src $ make[4]: *** [gsmtap_util.lo] Error 1
A google search for "implicit declaration of function 'perror'" made it look like I am missing header declarations included in the "build-essential" packages, but this package does not exist for Om2008.8. I have included my config.log. Any ideas what I am missing?
-Alex
http://baseband-devel.722152.n3.nabble.com/file/n2851445/config.log config.log
-- View this message in context: http://baseband-devel.722152.n3.nabble.com/Osmocom-Freerunner-compilation-is... Sent from the baseband-devel mailing list archive at Nabble.com.
at first guess, it seems to me that you shuld be using bash, not sh
2011/4/22 zredlined zredlined@gmail.com
I have been trying to compile the latest osmocom-bb build target binaries directly on my Freerunner, which is running Om2008.8.
uname -a // Linux om-gta02 2.6.28-rc4 #1 PREEMPT Mon Mar 2 19:43:22 CET 2009 armv4tl unknown
Unfortunately, I am getting an error during compilation in:
directory // `/src/shared/libosmocore/build-target/src'
GCC output:
make[3]: Entering directory `/home/root/osmocom/src/shared/libosmocore/build-target/src' make: *** [shared/libosmocore/build-target/src/.libs/libosmocore.a] Error 2
Making all in . make[4]: Entering directory `/home/root/osmocom/src/shared/libosmocore/build-target/src' CC gsmtap_util.lo In file included from ../../src/gsmtap_util.c:37: /usr/include/netinet/in.h:365: error: expected declaration specifiers or '...' before '(' token
-sh: syntax error: "(" unexpected root@om-gta02 ~/osmocom/src $ /usr/include/netinet/in.h:365: error: expected ')' before '?' token -sh: /usr/include/netinet/in.h:365:: not found root@om-gta02 ~/osmocom/src $ /usr/include/netinet/in.h:366: error: expected declaration specifiers or '...' before '(' token -sh: /usr/include/netinet/in.h:366:: not found root@om-gta02 ~/osmocom/src $ /usr/include/netinet/in.h:366: error: expected ')' before '?' token -sh: /usr/include/netinet/in.h:366:: not found root@om-gta02 ~/osmocom/src $ /usr/include/netinet/in.h:368: error: expected declaration specifiers or '...' before '(' token -sh: /usr/include/netinet/in.h:368:: not found root@om-gta02 ~/osmocom/src $ /usr/include/netinet/in.h:368: error: expected ')' before '?' token -sh: /usr/include/netinet/in.h:368:: not found root@om-gta02 ~/osmocom/src $ /usr/include/netinet/in.h:370: error: expected declaration specifiers or '...' before '(' token -sh: /usr/include/netinet/in.h:370:: not found root@om-gta02 ~/osmocom/src $ /usr/include/netinet/in.h:370: error: expected ')' before '?' token -sh: /usr/include/netinet/in.h:370:: not found root@om-gta02 ~/osmocom/src $ ../../src/gsmtap_util.c: In function 'gsmtap_fd_cb': -sh: ../../src/gsmtap_util.c:: not found root@om-gta02 ~/osmocom/src $ ../../src/gsmtap_util.c:155: warning: implicit declaration of function 'perror' -sh: ../../src/gsmtap_util.c:155:: not found root@om-gta02 ~/osmocom/src $ make[4]: *** [gsmtap_util.lo] Error 1
A google search for "implicit declaration of function 'perror'" made it look like I am missing header declarations included in the "build-essential" packages, but this package does not exist for Om2008.8. I have included my config.log. Any ideas what I am missing?
-Alex
http://baseband-devel.722152.n3.nabble.com/file/n2851445/config.log config.log
-- View this message in context: http://baseband-devel.722152.n3.nabble.com/Osmocom-Freerunner-compilation-is... Sent from the baseband-devel mailing list archive at Nabble.com.
Hi,
On 22/04/2011 16:07, zredlined wrote:
I have been trying to compile the latest osmocom-bb build target binaries directly on my Freerunner, which is running Om2008.8. [...] A google search for "implicit declaration of function 'perror'" made it look like I am missing header declarations included in the "build-essential" packages, but this package does not exist for Om2008.8. I have included my config.log. Any ideas what I am missing?
my suggestion would be that you use a distribution that's still actively maintained, and meant to be used for development.
Debian is probably the way to go, either via DebianOnFreerunner: http://wiki.debian.org/DebianOnFreeRunner
or via hackable:1: http://build.hackable1.org/images/
HTH,
On 04/22/2011 04:07 PM, zredlined wrote:
In file included from ../../src/gsmtap_util.c:37: /usr/include/netinet/in.h:365: error: expected declaration specifiers or '...' before '(' token
What is at that line? The issue is a bit of using a GNU Linux EABI toolchain when we are not really targeting Linux. I assume it fails on the stdint.h types again.
On 04/23/2011 05:37 PM, Holger Hans Peter Freyther wrote:
On 04/22/2011 04:07 PM, zredlined wrote:
In file included from ../../src/gsmtap_util.c:37: /usr/include/netinet/in.h:365: error: expected declaration specifiers or '...' before '(' token
What is at that line? The issue is a bit of using a GNU Linux EABI toolchain when we are not really targeting Linux. I assume it fails on the stdint.h types again.
You will need to remove the Makefile for the target libosmocore build update the sourcecode and rebuild. I added a patch to inject an autoconf result.
These are the lines the compiler is referring to in netinet/in.h:
/* Get system-specific definitions. */ #include <bits/in.h>
/* Functions to convert between host and network byte order.
Please note that these functions normally take `unsigned long int' or `unsigned short int' values as arguments and also return them. But this was a short-sighted decision since on different systems the types may have different representations but the values are always the same. */
:365 extern uint32_t ntohl (uint32_t __netlong) __THROW __attribute__ ((__const__)); :366 extern uint16_t ntohs (uint16_t __netshort) :367 __THROW __attribute__ ((__const__)); :368 extern uint32_t htonl (uint32_t __hostlong) :369 __THROW __attribute__ ((__const__)); :370 extern uint16_t htons (uint16_t __hostshort) :371 __THROW __attribute__ ((__const__));
I do not believe it is a syntax error, it's possibly a re-declaration of these functions with different input and outputs. If I change the function names to "ntohl1" for example, the program compiles successfully.
Holger: Where can I download the patch you made to pass parameters correctly to the libosmocore make file?
All: If this does not work correctly soon, I'll take your advice and try debian on the openmoko
Thanks!
-- View this message in context: http://baseband-devel.722152.n3.nabble.com/Osmocom-Freerunner-compilation-is... Sent from the baseband-devel mailing list archive at Nabble.com.
baseband-devel@lists.osmocom.org