R: another compiling problem (beginner)

screaming-pain at libero.it screaming-pain at libero.it
Mon Apr 4 15:15:32 UTC 2011


Hi all,

I found out the -nodefaultlibs option is due to a recent patch, so it seems it 
is solving someone's problem, but it may not be good for everyone.
I could compile osmocon-bb without -nodefaultlibs and I found out it compiles 
without -nostartfiles as well.
May be this two options should not be hardcoded, because someone else could 
have my same problem with the -nodefaultlibs 
(the -nodefaultfiles did not cause problems to me but seems not to be 
essential)

Regards,
Loretta

>----Messaggio originale----
>Da: screaming-pain at libero.it
>Data: 1-apr-2011 13.14
>A: <baseband-devel at lists.osmocom.org>
>Ogg: another compiling problem (beginner)
>
>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 
>cast
>/home/loretta/install/gnuarm-3.4.3/bin/../lib/gcc/arm-elf/3.4.3/../../../..
>/arm-elf/bin/ld: warning: cannot find entry symbol _start; defaulting to 
>00008000
>/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_VERSION "UNKNOWN"
>| #define PACKAGE_STRING "libosmocore UNKNOWN"
>| #define PACKAGE_BUGREPORT "openbsc-devel at lists.openbsc.org"
>| #define PACKAGE_URL ""
>| #define PACKAGE "libosmocore"
>| #define VERSION "UNKNOWN"
>| /* 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,
>Loretta
>
>






More information about the baseband-devel mailing list