another compiling problem (beginner)

screaming-pain at screaming-pain at
Fri Apr 1 11:14:03 UTC 2011

Hi all,

Sorry for bothering with another compiling problem.
I had the following error while compiling osmocom-bb:

configure:3246: arm-elf-gcc -Os -ffunction-sections -I/home/loretta/osmocom-
bb/src/target/firmware/include -nostartfiles -nodefaultlibs   conftest.c  >&5
conftest.c: In function `main':
conftest.c:15: warning: initialization makes pointer from integer without a 
/arm-elf/bin/ld: warning: cannot find entry symbol _start; defaulting to 
/tmp/ccgIuxoW.o(.text.main+0x14): In function `main':
: undefined reference to `fopen'
/tmp/ccgIuxoW.o(.text.main+0x1c): In function `main':
: undefined reference to `ferror'
/tmp/ccgIuxoW.o(.text.main+0x30): In function `main':
: undefined reference to `fclose'
collect2: ld returned 1 exit status
configure:3250: $? = 1
configure:3287: result: 
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "libosmocore"
| #define PACKAGE_TARNAME "libosmocore"
| #define PACKAGE_STRING "libosmocore UNKNOWN"
| #define PACKAGE_BUGREPORT "openbsc-devel at"
| #define PACKAGE_URL ""
| #define PACKAGE "libosmocore"
| /* end confdefs.h.  */
| #include <stdio.h>
| int
| main ()
| {
| FILE *f = fopen ("conftest.out", "w");
|  return ferror (f) || fclose (f) != 0;
|   ;
|   return 0;
| }

after hours of trying to understand how to fix this, I figured out that 
without the option -nodefaultlibs everything run smoothly.
Now, the problem is that I do not understand much of what is going on and I 
wonder, do I need that option and hence should look for a different way of 
fixing the problem?

Thanks for your help,

More information about the baseband-devel mailing list