first build, grabbed repository today. ran into some issues running make from src.
ERROR 1 (snippits): cd host/layer23 && autoreconf -i cd host/layer23 && LIBOSMOCORE_LIBS=/osmocom-bb/src/shared/libosmocore/build-host/src/.libs/libosmocore.a LIBOSMOCORE_CFLAGS=-I/osmocom-bb/src/shared/libosmocore/include ./configure ./configure: line 3361: syntax error near unexpected token `LIBOSMOCORE,' ./configure: line 3461: `PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore)' SOLUTION: i do have pkg-config installed, as well as aclocal 1.10. Commenting out line 3461 continues. Perhaps the errors that happen thereafter are a result of this.
ERROR 2: cd host/osmocon && autoreconf -i cd host/osmocon && LIBOSMOCORE_LIBS=/osmocom-bb/src/shared/libosmocore/build-host/src/.libs/libosmocore.a LIBOSMOCORE_CFLAGS=-I/osmocom-bb/src/shared/libosmocore/include ./configure ./configure: line 3364: syntax error near unexpected token `LIBOSMOCORE,' ./configure: line 3364: `PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore)' SOLUTION: same
ERROR 3: arm-elf-ld -nostartfiles -nostdlib -nodefaultlibs --gc-sections -T board/common/compal_ramload.lds -Bstatic -Map board/compal_e88/hello_world.map -o board/compal_e88/hello_world.elf --start-group apps/hello_world/main.o board/common/compal_ramload_start.o abb/twl3025.o rf/trf6151.o display/font_r8x8.o display/font_r8x8_horiz.o display/st7558.o display/ssd1783.o display/display.o flash/cfi_flash.o calypso/libcalypso.a layer1/liblayer1.a lib/libmini.a comm/libcomm.a ../../shared/libosmocore/build-target/src/.libs/libosmocore.a board/common/rffe_compal_dualband.o board/compal_e88/init.o board/compal_e88/board.o --end-group calypso/libcalypso.a: could not read symbols: Archive has no index; run ranlib to add one make[1]: *** [board/compal_e88/hello_world.elf] Error 1 make: *** [firmware] Error 2 $ cd target/firmware/calypso/ $ ranlib libcalypso.a ranlib: warning for library: libcalypso.a the table of contents is empty (no object file members in the library define global symbols)
Any clues?
thanks
Thanks for the nudge. I had this setup already but first make run i did was with a PATH set to a osx installed aclocal and for some reason my make clean was also dieing. Anyway, rebased the repo and ran make with proper PATH. Now I'm only getting Error 3 mentioned before:
arm-elf-ld -nostartfiles -nostdlib -nodefaultlibs --gc-sections -T board/common/compal_ramload.lds -Bstatic -Map board/compal_e88/hello_world.map -o board/compal_e88/hello_world.elf --start-group apps/hello_world/main.o board/common/compal_ramload_start.o abb/twl3025.o rf/trf6151.o display/font_r8x8.o display/font_r8x8_horiz.o display/st7558.o display/ssd1783.o display/display.o flash/cfi_flash.o calypso/libcalypso.a layer1/liblayer1.a lib/libmini.a comm/libcomm.a ../../shared/libosmocore/build-target/src/.libs/libosmocore.a board/common/rffe_compal_dualband.o board/compal_e88/init.o board/compal_e88/board.o --end-group calypso/libcalypso.a: could not read symbols: Archive has no index; run ranlib to add one make[1]: *** [board/compal_e88/hello_world.elf] Error 1 make: *** [firmware] Error 2
I have this setup:
$ /opt/local/bin/aclocal --version aclocal (GNU automake) 1.11 $ pkg-config --version 0.23 $ /opt/local/bin/aclocal --print-ac-dir /opt/local/share/aclocal $ ls /opt/local/share/aclocal/pkg.m4 /opt/local/share/aclocal/pkg.m4
Concerning the recommendation to use ranlib... the macport install of liblocal doesnt include ranlib support. liblocal docs say ranlib has been deprecated with 'liblocal --static'. I suppose I could find or compile a version that supports ranlib. Do we require this?
Are the objects included in libcalypso.a supposed to have symbol tables? If so, it appears on my system they are not getting built that way.
(recreated libcalypso.a generation step with some cmd flag changes) $ ar vsru calypso/libcalypso.a calypso/arm.o calypso/clock.o calypso/dma.o calypso/dsp.o calypso/du.o calypso/i2c.o calypso/irq.o calypso/rtc.o calypso/spi.o calypso/tpu.o calypso/tsp.o calypso/keypad.o calypso/misc.o calypso/timer.o calypso/backlight.o calypso/uart.o calypso/uwire.o ar: creating archive calypso/libcalypso.a a - calypso/arm.o a - calypso/clock.o a - calypso/dma.o a - calypso/dsp.o a - calypso/du.o a - calypso/i2c.o a - calypso/irq.o a - calypso/rtc.o a - calypso/spi.o a - calypso/tpu.o a - calypso/tsp.o a - calypso/keypad.o a - calypso/misc.o a - calypso/timer.o a - calypso/backlight.o a - calypso/uart.o a - calypso/uwire.o ranlib: warning for library: calypso/libcalypso.a the table of contents is empty (no object file members in the library define global symbols)
The added 's' flag causes the warning and was not included in with the common make for libcalypso.a. I added it because the man page says "Running `ar s' on an archive is equivalent to running `ranlib' on it." and considering that the error from my previous mail suggested running ranlib, its just a guess that this might relate.
On Sun, 14 Mar 2010 10:10:41 +0000, Nathan Fain nat@fains.com wrote:
Thanks for the nudge. I had this setup already but first make run i did was with a PATH set to a osx installed aclocal and for some reason my
make
clean was also dieing. Anyway, rebased the repo and ran make with proper PATH. Now I'm only getting Error 3 mentioned before:
arm-elf-ld -nostartfiles -nostdlib -nodefaultlibs --gc-sections -T board/common/compal_ramload.lds -Bstatic -Map board/compal_e88/hello_world.map -o board/compal_e88/hello_world.elf --start-group apps/hello_world/main.o
board/common/compal_ramload_start.o
abb/twl3025.o rf/trf6151.o display/font_r8x8.o display/font_r8x8_horiz.o display/st7558.o display/ssd1783.o display/display.o flash/cfi_flash.o calypso/libcalypso.a layer1/liblayer1.a lib/libmini.a comm/libcomm.a ../../shared/libosmocore/build-target/src/.libs/libosmocore.a board/common/rffe_compal_dualband.o board/compal_e88/init.o board/compal_e88/board.o --end-group calypso/libcalypso.a: could not read symbols: Archive has no index; run ranlib to add one make[1]: *** [board/compal_e88/hello_world.elf] Error 1 make: *** [firmware] Error 2
I have this setup:
$ /opt/local/bin/aclocal --version aclocal (GNU automake) 1.11 $ pkg-config --version 0.23 $ /opt/local/bin/aclocal --print-ac-dir /opt/local/share/aclocal $ ls /opt/local/share/aclocal/pkg.m4 /opt/local/share/aclocal/pkg.m4
Concerning the recommendation to use ranlib... the macport install of liblocal doesnt include ranlib support. liblocal docs say ranlib has
been
deprecated with 'liblocal --static'. I suppose I could find or compile
a
version that supports ranlib. Do we require this?
On Sunday 14 March 2010 11:10:41 Nathan Fain wrote:
Concerning the recommendation to use ranlib... the macport install of liblocal doesnt include ranlib support. liblocal docs say ranlib has been deprecated with 'liblocal --static'. I suppose I could find or compile a version that supports ranlib. Do we require this?
Well, you should use ar, ranlib and such from the toolchain. I'm not sure but it might be the case that we accidently use the "ar", "ranlib" from the host GNU host and that it magically happens to work.
You will have to look at the line with "ar" and see if arm-*-ar was used and if not you will need to patch the Makefile to do so.
holger
Well, you should use ar, ranlib and such from the toolchain. I'm not sure but it might be the case that we accidently use the "ar", "ranlib" from the host GNU host and that it magically happens to work.
You will have to look at the line with "ar" and see if arm-*-ar was used and if not you will need to patch the Makefile to do so.
I think you're right. Look in firmware/Makefile.inc line 118
It should probably be
$(CROSS_COMPILE)$(AR) cru $$($(1)_DIR)/lib$(1).a $$($(1)_OBJS)
instead of just:
$(AR) cru $$($(1)_DIR)/lib$(1).a $$($(1)_OBJS)
Sylvain
On Sun, 14 Mar 2010 13:12:10 +0100, Sylvain Munaut 246tnt@gmail.com wrote:
I think you're right. Look in firmware/Makefile.inc line 118
It should probably be
$(CROSS_COMPILE)$(AR) cru $$($(1)_DIR)/lib$(1).a $$($(1)_OBJS)instead of just:
$(AR) cru $$($(1)_DIR)/lib$(1).a $$($(1)_OBJS)
definitely the more intelligent solution, rather than what I just sent. thanks :)
On 2010-03-14 13:15:00, Nathan Fain wrote:
On Sun, 14 Mar 2010 13:12:10 +0100, Sylvain Munaut 246tnt@gmail.com wrote:
I think you're right. Look in firmware/Makefile.inc line 118
It should probably be
$(CROSS_COMPILE)$(AR) cru $$($(1)_DIR)/lib$(1).a $$($(1)_OBJS)instead of just:
$(AR) cru $$($(1)_DIR)/lib$(1).a $$($(1)_OBJS)definitely the more intelligent solution, rather than what I just sent. thanks :)
another solution:
the macports arm-elf-binutils package installs all tools with arm-elf prefix, while the target configure script expects arm-elf-linux.
in the toplevel Makefile there is an explicit override of CC with arm-elf-gcc all the other tools are searched for with the 'arm-elf-linux-' prefix.
also note this warning in the configure output: ====== configure: WARNING: using cross tools not prefixed with host triplet ======
two possible solutions:
1) add symlinks with the arm-elf-linux for all relevant binaries.
for i in strip objdump ar ranlib; do ln -sf $(dirname $(which arm-elf-gcc))/arm-elf-$i ~/bin/arm-elf-linux-$i; done
2) add more overrides to the target configure line
RANLIB="$(CROSS_TOOL_PREFIX)ranlib" OBJDUMP="$(CROSS_TOOL_PREFIX)objdump" AR="$(CROSS_TOOL_PREFIX)ar" STRIP="$(CROSS_TOOL_PREFIX
willem
On Sun, 14 Mar 2010 12:54:09 +0100, Holger Freyther zecke@selfish.org wrote:
On Sunday 14 March 2010 11:10:41 Nathan Fain wrote: You will have to look at the line with "ar" and see if arm-*-ar was used and if not you will need to patch the Makefile to do so.
This was the issue. A check with arm-elf-objdump shows that these objects definitely have symbol tables. For some reason my build was using 'ar' instead of 'arm-elf-ar'. I'm sure there is a more intelligent solution but for any other idiots out there that run into this, I just rebuilt the archives by hand:
cd target/firmware/ rm calypso/libcalypso.a arm-elf-ar vru calypso/libcalypso.a calypso/arm.o calypso/clock.o calypso/dma.o calypso/dsp.o calypso/du.o calypso/i2c.o calypso/irq.o calypso/rtc.o calypso/spi.o calypso/tpu.o calypso/tsp.o calypso/keypad.o calypso/misc.o calypso/timer.o calypso/backlight.o calypso/uart.o calypso/uwire.o rm layer1/liblayer1.a arm-elf-ar cru layer1/liblayer1.a layer1/avg.o layer1/agc.o layer1/afc.o layer1/sync.o layer1/tdma_sched.o layer1/tpu_window.o layer1/init.o layer1/l23_api.o layer1/mframe_sched.o layer1/sched_gsmtime.o layer1/async.o rm lib/libmini.a arm-elf-ar cru lib/libmini.a lib/vsprintf.o lib/string.o lib/ctype.o lib/printf.o lib/console.o lib/changebit.o lib/clearbit.o lib/div64.o lib/lib1funcs.o lib/memcpy.o lib/memset.o lib/setbit.o lib/testchangebit.o lib/testclearbit.o lib/testsetbit.o rm comm/libcomm.a arm-elf-ar cru comm/libcomm.a comm/msgb.o comm/sercomm.o comm/sercomm_cons.o comm/timer.o cd ../../shared/libosmocore/build-target/src/ arm-elf-ar cru .libs/libosmocore.a timer.o select.o signal.o msgb.o tlv_parser.o bitvec.o comp128.o gsm_utils.o statistics.o write_queue.o utils.o rsl.o gsm48.o rxlev_stat.o
This worked and the build completes.
baseband-devel@lists.osmocom.org