Hi list, Yesterday when I tried to to make a new build of sylvain/testing I encountered following errors when running make(and also when running make HOST_layer23_CONFARGS=--enable-transceiver): -------------------------------------- make -C target/firmware CROSS_COMPILE=arm-elf- make[1]: Entering directory `/root/osmocom-bb/src/target/firmware' apps/trx/trx.c:22:22: inttypes.h: No such file or directory make[1]: Leaving directory `/root/osmocom-bb/src/target/firmware' make[1]: Entering directory `/root/osmocom-bb/src/target/firmware' apps/trx/trx.c:22:22: inttypes.h: No such file or directory make[1]: *** No rule to make target `apps/trx/trx.p', needed by `all'. Stop. make[1]: Leaving directory `/root/osmocom-bb/src/target/firmware' make: *** [firmware] Error 2 -------------------------------------------
Master branch builds fine on backtrack 5 r2 and so did also Sylvain/testing earlier. Searching mailing-list gives some info that removing inttypes.h can be done as that "is taken care of by upstrean libosmocore".However I have read that inntypes.h should exist. I tested and removed inttypes.h in trx/trx.c. Recompiling gives an error message about parse error before debug-message PRIu32 on line 69 in trx/trx.c. Commenting out that line makes it build, but as info obtained earlier I now guess I have also removed some key-functionality and my approach is wrong?
Further searching gave some unclear/vague(mostly for other situations) hints that the line #include <inttypes.h> could be replaced by: #ifdef HAVE_STDINT_H #include <stdint.h> #else #include <include <inttypes.h> #endif I tested replacing #include <inttypes.h> by the abovein trx.c also but it didn't work. Any ideas or hints what migh be wrong?
Enclosed is the full build-error-log from running without making any changes to inttypes.h. Regards erich
Hi,
Master branch builds fine on backtrack 5 r2 and so did also Sylvain/testing earlier.
Yes, the file with that include is newly added.
I tested and removed inttypes.h in trx/trx.c. Recompiling gives an error message about parse error before debug-message PRIu32 on line 69 in trx/trx.c.
PRIu32 is AFAIK the proper way of printing a uint32_t without generating a warning and without making assumptions about the platform.
inttypes.h is a standard C99 header file, if you distribution doesn't have it, I would suggest reporting the bug to them.
I tested replacing #include <inttypes.h> by the abovein trx.c also but it didn't work.
It wont's stdint.h is a subset of inttype.h so you could replace stdint.h by inttype.h but not the other way around.
Cheers,
Sylvain
I tested and removed inttypes.h in trx/trx.c. Recompiling gives an error message about parse error before debug-message PRIu32 on line 69 in trx/trx.c.
PRIu32 is AFAIK the proper way of printing a uint32_t without generating a warning and without making assumptions about the platform.
inttypes.h is a standard C99 header file, if you distribution doesn't have it, I would suggest reporting the bug to them.
As was pointed out to me, it's the trx.c file from the firmware and not the one from the host app, so the bug should go to the cross toolchain provider I guess.
That printf is definitely not a "key-functionality" so you can just remote it, however, I would expect that while fixing other GCC warnings, the use of inttypes.h will rise in the future, so I'd suggest you get a good toolchain. See http://bb.osmocom.org/trac/wiki/GnuArmToolchain for how to build one.
Cheers,
Sylvain
Hi sylvain and thanks for your replies. As you pointed out the resolution to the problem was to build new toolchain according to instructions in wiki, which does build( in backtrack r2 )both master and testing branch without complaining about inttypes.h regards erich
________________________________ Fra: Sylvain Munaut 246tnt@gmail.com Til: Erich Dachleger edachleger@yahoo.com Kopi: "baseband-devel@lists.osmocom.org" baseband-devel@lists.osmocom.org Sendt: Lørdag, 19. januar 2013 14.18 Emne: Re: sylvain/testing: apps/trx/trx.c: inttypes.h:No such file or directory
I tested and removed inttypes.h in trx/trx.c. Recompiling gives an error message about parse error before debug-message PRIu32 on line 69 in trx/trx.c.
PRIu32 is AFAIK the proper way of printing a uint32_t without generating a warning and without making assumptions about the platform.
inttypes.h is a standard C99 header file, if you distribution doesn't have it, I would suggest reporting the bug to them.
As was pointed out to me, it's the trx.c file from the firmware and not the one from the host app, so the bug should go to the cross toolchain provider I guess.
That printf is definitely not a "key-functionality" so you can just remote it, however, I would expect that while fixing other GCC warnings, the use of inttypes.h will rise in the future, so I'd suggest you get a good toolchain. See http://bb.osmocom.org/trac/wiki/GnuArmToolchain for how to build one.
Cheers,
Sylvain
Hi,
As you pointed out the resolution to the problem was to build new toolchain according to instructions in wiki, which does build( in backtrack r2 )both master and testing branch without complaining about inttypes.h
Ok, good to know.
In the mean time, I also removed links from the wiki to outdated toolchains.
Cheers,
Sylvain
baseband-devel@lists.osmocom.org