Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

olsr 0.9.0.3 doesn't build with the musl C library #6

Closed
tpetazzoni opened this issue Oct 26, 2016 · 18 comments
Closed

olsr 0.9.0.3 doesn't build with the musl C library #6

tpetazzoni opened this issue Oct 26, 2016 · 18 comments

Comments

@tpetazzoni
Copy link

As explained in the title, olsr in its version 0.9.0.3 doesn't build with the musl C library, see:

[CC] src/linux/kernel_tunnel.c
In file included from src/kernel_tunnel.h:11:0,
                 from src/linux/kernel_tunnel.c:44:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if.h:79:2: error: expected identifier before numeric constant
  IFF_UP    = 1<<0,  /* sysfs */
  ^
In file included from /home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if_tunnel.h:5:0,
                 from src/linux/kernel_tunnel.c:60:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if.h:189:8: error: redefinition of ‘struct ifmap’
 struct ifmap {
        ^
In file included from src/kernel_tunnel.h:11:0,
                 from src/linux/kernel_tunnel.c:44:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/net/if.h:64:8: note: originally defined here
 struct ifmap {
        ^
In file included from /home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if_tunnel.h:5:0,
                 from src/linux/kernel_tunnel.c:60:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if.h:226:8: error: redefinition of ‘struct ifreq’
 struct ifreq {
        ^
In file included from src/kernel_tunnel.h:11:0,
                 from src/linux/kernel_tunnel.c:44:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/net/if.h:76:8: note: originally defined here
 struct ifreq {
        ^
In file included from /home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if_tunnel.h:5:0,
                 from src/linux/kernel_tunnel.c:60:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if.h:278:8: error: redefinition of ‘struct ifconf’
 struct ifconf  {
        ^
In file included from src/kernel_tunnel.h:11:0,
                 from src/linux/kernel_tunnel.c:44:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/net/if.h:116:8: note: originally defined here
 struct ifconf {
        ^
In file included from /home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if_tunnel.h:7:0,
                 from src/linux/kernel_tunnel.c:60:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/in6.h:32:8: error: redefinition of ‘struct in6_addr’
 struct in6_addr {
        ^
In file included from src/defs.h:49:0,
                 from src/kernel_tunnel.h:18,
                 from src/linux/kernel_tunnel.c:44:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:23:8: note: originally defined here
 struct in6_addr {
        ^
In file included from /home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if_tunnel.h:7:0,
                 from src/linux/kernel_tunnel.c:60:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/in6.h:49:8: error: redefinition of ‘struct sockaddr_in6’
 struct sockaddr_in6 {
        ^
In file included from src/defs.h:49:0,
                 from src/kernel_tunnel.h:18,
                 from src/linux/kernel_tunnel.c:44:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:34:8: note: originally defined here
 struct sockaddr_in6 {
        ^
In file included from /home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if_tunnel.h:7:0,
                 from src/linux/kernel_tunnel.c:60:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/in6.h:59:8: error: redefinition of ‘struct ipv6_mreq’
 struct ipv6_mreq {
        ^
In file included from src/defs.h:49:0,
                 from src/kernel_tunnel.h:18,
                 from src/linux/kernel_tunnel.c:44:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:42:8: note: originally defined here
 struct ipv6_mreq {
        ^
Makefile.inc:268: recipe for target 'src/linux/kernel_tunnel.o' failed
make[2]: *** [src/linux/kernel_tunnel.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from src/routing_table.h:49:0,
                 from src/kernel_routes.h:46,
                 from src/linux/kernel_routes_nl.c:44:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if.h:79:2: error: expected identifier before numeric constant
  IFF_UP    = 1<<0,  /* sysfs */
  ^
In file included from /home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if_tunnel.h:5:0,
                 from src/linux/kernel_routes_nl.c:59:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if.h:189:8: error: redefinition of ‘struct ifmap’
 struct ifmap {
        ^
In file included from src/routing_table.h:49:0,
                 from src/kernel_routes.h:46,
                 from src/linux/kernel_routes_nl.c:44:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/net/if.h:64:8: note: originally defined here
 struct ifmap {
        ^
In file included from /home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if_tunnel.h:5:0,
                 from src/linux/kernel_routes_nl.c:59:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if.h:226:8: error: redefinition of ‘struct ifreq’
 struct ifreq {
        ^
In file included from src/routing_table.h:49:0,
                 from src/kernel_routes.h:46,
                 from src/linux/kernel_routes_nl.c:44:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/net/if.h:76:8: note: originally defined here
 struct ifreq {
        ^
In file included from /home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if_tunnel.h:5:0,
                 from src/linux/kernel_routes_nl.c:59:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if.h:278:8: error: redefinition of ‘struct ifconf’
 struct ifconf  {
        ^
In file included from src/routing_table.h:49:0,
                 from src/kernel_routes.h:46,
                 from src/linux/kernel_routes_nl.c:44:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/net/if.h:116:8: note: originally defined here
 struct ifconf {
        ^
In file included from /home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if_tunnel.h:7:0,
                 from src/linux/kernel_routes_nl.c:59:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/in6.h:32:8: error: redefinition of ‘struct in6_addr’
 struct in6_addr {
        ^
In file included from src/defs.h:49:0,
                 from src/kernel_routes.h:45,
                 from src/linux/kernel_routes_nl.c:44:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:23:8: note: originally defined here
 struct in6_addr {
        ^
In file included from /home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if_tunnel.h:7:0,
                 from src/linux/kernel_routes_nl.c:59:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/in6.h:49:8: error: redefinition of ‘struct sockaddr_in6’
 struct sockaddr_in6 {
        ^
In file included from src/defs.h:49:0,
                 from src/kernel_routes.h:45,
                 from src/linux/kernel_routes_nl.c:44:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:34:8: note: originally defined here
 struct sockaddr_in6 {
        ^
In file included from /home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if_tunnel.h:7:0,
                 from src/linux/kernel_routes_nl.c:59:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/in6.h:59:8: error: redefinition of ‘struct ipv6_mreq’
 struct ipv6_mreq {
        ^
In file included from src/defs.h:49:0,
                 from src/kernel_routes.h:45,
                 from src/linux/kernel_routes_nl.c:44:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:42:8: note: originally defined here
 struct ipv6_mreq {
        ^
In file included from /home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if_tunnel.h:5:0,
                 from src/linux/kernel_routes_nl.c:59:
src/linux/kernel_routes_nl.c: In function ‘netlink_process_link’:
src/linux/kernel_routes_nl.c:124:42: error: ‘IFF_UP’ undeclared (first use in this function)
   if (iface == NULL && (ifi->ifi_flags & IFF_UP) == IFF_UP) {
                                          ^
src/linux/kernel_routes_nl.c:124:42: note: each undeclared identifier is reported only once for each function it appears in
src/linux/kernel_routes_nl.c: In function ‘rtnetlink_read’:
src/linux/kernel_routes_nl.c:158:5: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
     NULL,
     ^
src/linux/kernel_routes_nl.c:158:5: note: (near initialization for ‘msg.__pad1’)
Makefile.inc:268: recipe for target 'src/linux/kernel_routes_nl.o' failed
make[2]: *** [src/linux/kernel_routes_nl.o] Error 1
@fhuberts
Copy link
Contributor

olsrd is not prepared for parallel compilation, first try building it that way.

@tpetazzoni
Copy link
Author

Thanks for the feedback. Building with make -j1 doesn't change anything to the musl compatibility issue:

PATH="/home/thomas/projets/buildroot/output/host/bin:/home/thomas/projets/buildroot/output/host/sbin:/home/thomas/projets/buildroot/output/host/usr/bin:/home/thomas/projets/buildroot/output/host/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/thomas/sys/bin:/home/thomas/.gem/ruby/2.1.0/bin" AR="/home/thomas/projets/buildroot/output/host/usr/bin/x86_64-linux-ar" AS="/home/thomas/projets/buildroot/output/host/usr/bin/x86_64-linux-as" LD="/home/thomas/projets/buildroot/output/host/usr/bin/x86_64-linux-ld" NM="/home/thomas/projets/buildroot/output/host/usr/bin/x86_64-linux-nm" CC="/home/thomas/projets/buildroot/output/host/usr/bin/x86_64-linux-gcc" GCC="/home/thomas/projets/buildroot/output/host/usr/bin/x86_64-linux-gcc" CPP="/home/thomas/projets/buildroot/output/host/usr/bin/x86_64-linux-cpp" CXX="/home/thomas/projets/buildroot/output/host/usr/bin/x86_64-linux-g++" FC="/home/thomas/projets/buildroot/output/host/usr/bin/x86_64-linux-gfortran" F77="/home/thomas/projets/buildroot/output/host/usr/bin/x86_64-linux-gfortran" RANLIB="/home/thomas/projets/buildroot/output/host/usr/bin/x86_64-linux-ranlib" READELF="/home/thomas/projets/buildroot/output/host/usr/bin/x86_64-linux-readelf" STRIP="/home/thomas/projets/buildroot/output/host/usr/bin/x86_64-linux-strip" OBJCOPY="/home/thomas/projets/buildroot/output/host/usr/bin/x86_64-linux-objcopy" OBJDUMP="/home/thomas/projets/buildroot/output/host/usr/bin/x86_64-linux-objdump" AR_FOR_BUILD="/usr/bin/ar" AS_FOR_BUILD="/usr/bin/as" CC_FOR_BUILD="/usr/bin/gcc" GCC_FOR_BUILD="/usr/bin/gcc" CXX_FOR_BUILD="/usr/bin/g++" LD_FOR_BUILD="/usr/bin/ld" CPPFLAGS_FOR_BUILD="-I/home/thomas/projets/buildroot/output/host/usr/include" CFLAGS_FOR_BUILD="-O2 -I/home/thomas/projets/buildroot/output/host/usr/include" CXXFLAGS_FOR_BUILD="-O2 -I/home/thomas/projets/buildroot/output/host/usr/include" LDFLAGS_FOR_BUILD="-L/home/thomas/projets/buildroot/output/host/lib -L/home/thomas/projets/buildroot/output/host/usr/lib -Wl,-rpath,/home/thomas/projets/buildroot/output/host/usr/lib" FCFLAGS_FOR_BUILD="" DEFAULT_ASSEMBLER="/home/thomas/projets/buildroot/output/host/usr/bin/x86_64-linux-as" DEFAULT_LINKER="/home/thomas/projets/buildroot/output/host/usr/bin/x86_64-linux-ld" CPPFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os " CXXFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os " LDFLAGS="" FCFLAGS=" -Os " FFLAGS=" -Os " PKG_CONFIG="/home/thomas/projets/buildroot/output/host/usr/bin/pkg-config" STAGING_DIR="/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot" INTLTOOL_PERL=/usr/bin/perl /usr/bin/make -j1 ARCH=x86_64 -C /home/thomas/projets/buildroot/output/build/olsr-0.9.0.3 olsrd
[CC] src/common/autobuf.c
[CC] src/common/list.c
[CC] src/common/avl.c
[CC] src/ipc_frontend.c
[CC] src/parser.c
[CC] src/ipcalc.c
[CC] src/routing_table.c
[CC] src/olsr.c
[CC] src/lq_mpr.c
[CC] src/plugin_loader.c
[CC] src/scheduler.c
[CC] src/mantissa.c
[CC] src/build_msg.c
[CC] src/two_hop_neighbor_table.c
[CC] src/lq_plugin_default_ffeth.c
[CC] src/main.c
[CC] src/hashing.c
[CC] src/process_package.c
[CC] src/lq_plugin_default_ff.c
[CC] src/interfaces.c
[CC] src/lq_packet.c
[CC] src/gateway_costs.c
[CC] src/gateway.c
[CC] src/rebuild_packet.c
[CC] src/mpr_selector_set.c
[CC] src/hysteresis.c
[CC] src/lq_plugin_default_fpm.c
[CC] src/gateway_default_handler.c
[CC] src/packet.c
[CC] src/olsr_niit.c
[CC] src/lq_plugin_default_float.c
[CC] src/generate_msg.c
[CC] src/gateway_list.c
[CC] src/hna_set.c
[CC] src/neighbor_table.c
[CC] src/process_routes.c
[CC] src/fpm.c
[CC] src/egressFile.c
[CC] src/duplicate_handler.c
[CC] src/olsr_spf.c
[CC] src/tc_set.c
[CC] src/olsr_cookie.c
[CC] src/net_olsr.c
[CC] src/duplicate_set.c
[CC] src/mid_set.c
[CC] src/lq_plugin.c
[CC] src/link_set.c
[CC] src/plugin_util.c
[CC] src/mpr.c
[CC] src/linux/net.c
[CC] src/linux/kernel_routes_nl.c
In file included from src/routing_table.h:49:0,
                 from src/kernel_routes.h:46,
                 from src/linux/kernel_routes_nl.c:44:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if.h:79:2: error: expected identifier before numeric constant
  IFF_UP    = 1<<0,  /* sysfs */
  ^
In file included from /home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if_tunnel.h:5:0,
                 from src/linux/kernel_routes_nl.c:59:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if.h:189:8: error: redefinition of ‘struct ifmap’
 struct ifmap {
        ^
In file included from src/routing_table.h:49:0,
                 from src/kernel_routes.h:46,
                 from src/linux/kernel_routes_nl.c:44:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/net/if.h:64:8: note: originally defined here
 struct ifmap {
        ^
In file included from /home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if_tunnel.h:5:0,
                 from src/linux/kernel_routes_nl.c:59:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if.h:226:8: error: redefinition of ‘struct ifreq’
 struct ifreq {
        ^
In file included from src/routing_table.h:49:0,
                 from src/kernel_routes.h:46,
                 from src/linux/kernel_routes_nl.c:44:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/net/if.h:76:8: note: originally defined here
 struct ifreq {
        ^
In file included from /home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if_tunnel.h:5:0,
                 from src/linux/kernel_routes_nl.c:59:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if.h:278:8: error: redefinition of ‘struct ifconf’
 struct ifconf  {
        ^
In file included from src/routing_table.h:49:0,
                 from src/kernel_routes.h:46,
                 from src/linux/kernel_routes_nl.c:44:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/net/if.h:116:8: note: originally defined here
 struct ifconf {
        ^
In file included from /home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if_tunnel.h:7:0,
                 from src/linux/kernel_routes_nl.c:59:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/in6.h:32:8: error: redefinition of ‘struct in6_addr’
 struct in6_addr {
        ^
In file included from src/defs.h:49:0,
                 from src/kernel_routes.h:45,
                 from src/linux/kernel_routes_nl.c:44:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:23:8: note: originally defined here
 struct in6_addr {
        ^
In file included from /home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if_tunnel.h:7:0,
                 from src/linux/kernel_routes_nl.c:59:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/in6.h:49:8: error: redefinition of ‘struct sockaddr_in6’
 struct sockaddr_in6 {
        ^
In file included from src/defs.h:49:0,
                 from src/kernel_routes.h:45,
                 from src/linux/kernel_routes_nl.c:44:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:34:8: note: originally defined here
 struct sockaddr_in6 {
        ^
In file included from /home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if_tunnel.h:7:0,
                 from src/linux/kernel_routes_nl.c:59:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/in6.h:59:8: error: redefinition of ‘struct ipv6_mreq’
 struct ipv6_mreq {
        ^
In file included from src/defs.h:49:0,
                 from src/kernel_routes.h:45,
                 from src/linux/kernel_routes_nl.c:44:
/home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:42:8: note: originally defined here
 struct ipv6_mreq {
        ^
In file included from /home/thomas/projets/buildroot/output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if_tunnel.h:5:0,
                 from src/linux/kernel_routes_nl.c:59:
src/linux/kernel_routes_nl.c: In function ‘netlink_process_link’:
src/linux/kernel_routes_nl.c:124:42: error: ‘IFF_UP’ undeclared (first use in this function)
   if (iface == NULL && (ifi->ifi_flags & IFF_UP) == IFF_UP) {
                                          ^
src/linux/kernel_routes_nl.c:124:42: note: each undeclared identifier is reported only once for each function it appears in
src/linux/kernel_routes_nl.c: In function ‘rtnetlink_read’:
src/linux/kernel_routes_nl.c:158:5: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
     NULL,
     ^
src/linux/kernel_routes_nl.c:158:5: note: (near initialization for ‘msg.__pad1’)
Makefile.inc:268: recipe for target 'src/linux/kernel_routes_nl.o' failed
make[2]: *** [src/linux/kernel_routes_nl.o] Error 1
package/pkg-generic.mk:216: recipe for target '/home/thomas/projets/buildroot/output/build/olsr-0.9.0.3/.stamp_built' failed
make[1]: *** [/home/thomas/projets/buildroot/output/build/olsr-0.9.0.3/.stamp_built] Error 2
Makefile:88: recipe for target '_all' failed
make: *** [_all] Error 2

@fhuberts
Copy link
Contributor

fhuberts commented Oct 26, 2016

that is strange since I know Basti was able to compile it some time ago.
Also, the errors indicate that your musl copy might not be quite healthy.

For now I don't see a problem with olsrd, unless you can point it out a bit more clearly than a long list of include file errors from files outside of olsrd.

@tpetazzoni
Copy link
Author

Well, the build problem is due to olsrd mixing kernel headers and userspace headers, see http://wiki.musl-libc.org/wiki/FAQ#Q:_why_am_i_getting_.22error:_redefinition_of_struct_ethhdr.2Ftcphdr.2Fetc.22_.3F for details.

@bittorf
Copy link
Contributor

bittorf commented Nov 15, 2016

can you please try with musl-git from today?

@tpetazzoni
Copy link
Author

@bittorf
Copy link
Contributor

bittorf commented Nov 15, 2016

tpetazzoni: yes

@tpetazzoni
Copy link
Author

This musl commit is not sufficient by itself. Indeed, this musl commit only has an effect if the patch at http://www.openwall.com/lists/musl/2016/11/11/1 is applied to the kernel headers. So even when this patch gets applied to the kernel, we'll have issues for a long time, until everyone moves to a recent enough kernel to be able to use recent kernel headers.

@bittorf
Copy link
Contributor

bittorf commented Nov 17, 2016

i understand your issue, but what seems strange: you are building with musl but using an older kernel? i only compile olsrd-git with LEDE/OpenWrt - and the only thing i must patch away is the 'pud' and the 'pgraph'-plugin (because of missing gpsd-headers) but it compiles and runs fine...

@bittorf
Copy link
Contributor

bittorf commented Dec 12, 2016

tpetazzoni is right and it can easily reproduced with 'buildroot' from
git://git.busybox.net/buildroot - also it is the same for 0.9.5/master

@fhuberts
Copy link
Contributor

fhuberts commented Jan 4, 2017

See, is this still an issue for us to fix?
If not, then please close this issue

@bittorf
Copy link
Contributor

bittorf commented Jan 4, 2017

@fhuberts this is still an issue (but it works on OpenWRT/LEDE)

@fhuberts
Copy link
Contributor

fhuberts commented Jan 4, 2017

if it works there then I consider this 'not an issue'
so, close?

@bittorf
Copy link
Contributor

bittorf commented Jan 4, 2017

it is not an important issue, but it is an issue which should be left open. something for a long winter-evening.

@fhuberts
Copy link
Contributor

fhuberts commented Jan 4, 2017

Then I suggest someone with an active interest in compiling with musl should fix this.

Not really my itch to scratch.

@omokeri
Copy link

omokeri commented Jun 7, 2019

Hello all,

Please, I would like to build OLSR and modify it for my research. I have gone through this forum and I need as much help as I can get. If possible, we can collaborate together and write an article

@ffontaine
Copy link
Contributor

FYI, OLSR is building fine with musl under those two conditions:

buildroot-auto-update pushed a commit to buildroot/buildroot that referenced this issue Jan 12, 2020
olsr has been disabled on musl three years ago by commit
4bca88c.

Comments in OLSR/olsrd#6 suggest that the
issue was due to olsr mixing kernel and userspace headers. This issue is
still open.

However, nowadays olsr builds fine on musl under those two conditions:
- musl >= 1.1.16 (i.e. with
  http://git.musl-libc.org/cgit/musl/commit/?id=04983f2272382af92eb8f8838964ff944fbb8258)
- kernels >= 4.15 (i.e. with
  torvalds/linux@c0bace7)

So enable it back on musl with kernels >= 4.15.

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
@mathiashro
Copy link
Contributor

I'm closing this issue as @fhuberts provided some fixes and positive advice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants