Looks like in package libnewlib-dev for stretch (unstable) we have sys/select.h but in
jessie (stable) it is not included.
https://packages.debian.org/stretch/libnewlib-dev
https://packages.debian.org/jessie/libnewlib-dev
craig@box:~/libosmocore$ ./configure --prefix=/usr/local/arm-none-eabi
--host=arm-none-eabi --enable-embedded --disable-shared CFLAGS="-Os
-ffunction-sections -fdata-sections -nostartfiles -nodefaultlibs"
craig@box:~/libosmocore$ make
make all-recursive
make[1]: Entering directory '/home/craig/libosmocore'
Making all in include
make[2]: Entering directory '/home/craig/libosmocore/include'
make all-am
make[3]: Entering directory '/home/craig/libosmocore/include'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/home/craig/libosmocore/include'
make[2]: Leaving directory '/home/craig/libosmocore/include'
Making all in src
make[2]: Entering directory '/home/craig/libosmocore/src'
make all-am
make[3]: Entering directory '/home/craig/libosmocore/src'
CC select.lo
select.c:27:24: fatal error: sys/select.h: No such file or directory
#include <sys/select.h>
^
compilation terminated.
Makefile:510: recipe for target 'select.lo' failed
make[3]: *** [select.lo] Error 1
make[3]: Leaving directory '/home/craig/libosmocore/src'
Makefile:373: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/home/craig/libosmocore/src'
Makefile:519: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/craig/libosmocore'
Makefile:382: recipe for target 'all' failed
make: *** [all] Error 2
--------------------------------------------
On Tue, 5/16/17, Harald Welte <laforge(a)gnumonks.org> wrote:
Subject: removing ancient libosmocore fork from osmocom-bb.git
To: baseband-devel(a)lists.osmocom.org
Date: Tuesday, May 16, 2017, 11:18 AM
Dear all,
when we initially crated OsmocomBB, we moved the code that
it shared
with the pre-existing OpenBSC project into libosmocore.git,
where
libosmocore and libosmogsm are built. As libosmocore
was quite a bit in
flux (and we didn't have jenkins+gerrit yet), we decided to
have a local
clone of libosmocore.git as a git-subtree module inside
osmocom-bb.git
Meanwhile, upstream libosmocore received more and more code,
and none
of that was ever built with an 'arm-non-eabi' toolchain and
--enable-embedded.
I've been working quite a bit during the last week on making
that
embedded build work again.
The idea is to be able to configure + build libosmocore.git
master using
something like
./configure
--prefix=/usr/local/arm-none-eabi \
--host=arm-none-eabi
\
--enable-embedded \
--disable-shared \
CFLAGS="-Os
-ffunction-sections -fdata-sections -nostartfiles
-nodefaultlibs"
and then install it onto the host pc. I've used
/usr/local/arm-none-eabi as the prefix, but it could of
course be
anywhere.
The above already works for me on Debian unstable using
libosmocore.git
master. I have some patches pending in laforge/sercomm and
laforge/pseudotalloc, but those are not mandatory to make
the build work
The local clone of libosmocore in OsmocomBB
src/shared/libosmocore will
be removed, and the Makefiles of osmocom-bb instructed to
use the
system-installed libosmocore from /usr/local/arm-none-eabi
(see my
'laforge/remove-libosmocore' branch in). This also
already "works" on
my Debian unstable system, in as far as there are no
unresolved symbols
or other compilation/linking issues, and the firmware images
are
generated. I have not tested any of the resulting
binaries yet, and as
I'm travelling without compatible hardware (and overloaded),
it's
unlikely that I'll be able to test it soon.
Nevertheless, this is what I would like to move to. If
anyone wants to
try if he can build the embedded libosmocore and resulting
osmocom-bb
from laforge/remove-libosmocore branch, please do so and
report your
progress/success/issues here.
Next steps (after validating the above) are:
* remove old sercomm.c code from osmocom-bb and use the new
code from
libosmocore
* remove 'talloc emulation' from osmocom-bb and use
pseudotalloc from
libosmocore.git (plus an embedded 'malloc' like
umm_malloc)
Further ideas:
* create Debian/Ubuntu package of cross-compiled libosmocore
for
embedded-arm, which we can add to the Osmocom nightly
builds apt
repository.
* have an (optional?) osmocom-bb makefile step to git clone
+ configure
+ make install libosmocore
Anyone interested in helping out with this, please feel free
to join in.
Regards,
Harald
--
- Harald Welte <laforge(a)gnumonks.org>
http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable
marketing option."
(ETSI EN 300 175-7 Ch. A6)