Closed imp1sh closed 5 years ago
Is bmx7 supposed to compile on Debian, too?
Definitely yes.
I just reproduced this on my debian-10 VM and everything runs as expected.
Could you provide a more step by step description of your approach?
Did you follow the README directives? Did you try cloning the GitHub repo at the current commit of master?
I need to check out the repository from another machine, because the target I want to compile on is IPv6 only and github won't do IPv6 sadly. Then I copy it via scp (mc actually) to the target device. I Install plenty of software like asked for in the ReadMe via apt, like those: libiw-dev libjson-c-dev build-essential libmbedtls12 libmbedtls-dev libiw-dev Then I go into the src directory and run this: make EXTRA_CFLAGS="-DCRYPTLIB=MBEDTLS_2_4_0" and then I run ./bmx7 in the same directory. The error shows up. It's virtualized Debian 10 (qemu) on Proxmox 6. Don't know if that might be important.
This is the make output:
setup@debian1:~/bmx7/src$ make EXTRA_CFLAGS="-DCRYPTLIB=MBEDTLS_2_4_0"
make bmx7
make[1]: Verzeichnis „/home/setup/bmx7/src“ wird betreten
cc -pedantic -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Os -g3 -std=gnu99 -DGIT_REV=\"0\" -DAVL_5XLINKED -DDEBUG_MALLOC -DCORE_LIMIT=20000 -DCRYPTLIB=MBEDTLS_2_4_0 -c bmx.c -o bmx.o
cc -pedantic -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Os -g3 -std=gnu99 -DGIT_REV=\"0\" -DAVL_5XLINKED -DDEBUG_MALLOC -DCORE_LIMIT=20000 -DCRYPTLIB=MBEDTLS_2_4_0 -c key.c -o key.o
key.c: In function ‘kSetOutAction_listed’:
key.c:250:8: warning: unused variable ‘TODO_fix_catching_this_when_applying_trusts_or_limits’ [-Wunused-variable]
IDM_T TODO_fix_catching_this_when_applying_trusts_or_limits;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
key.c: In function ‘keyNode_delCredits_’:
key.c:863:8: warning: unused variable ‘TODO_FIX_THIS’ [-Wunused-variable]
IDM_T TODO_FIX_THIS;
^~~~~~~~~~~~~
At top level:
key.c:180:8: warning: ‘kCol_FALSE’ defined but not used [-Wunused-function]
int8_t kCol_FALSE(struct key_node *kn)
^~~~~~~~~~
cc -pedantic -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Os -g3 -std=gnu99 -DGIT_REV=\"0\" -DAVL_5XLINKED -DDEBUG_MALLOC -DCORE_LIMIT=20000 -DCRYPTLIB=MBEDTLS_2_4_0 -c node.c -o node.o
cc -pedantic -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Os -g3 -std=gnu99 -DGIT_REV=\"0\" -DAVL_5XLINKED -DDEBUG_MALLOC -DCORE_LIMIT=20000 -DCRYPTLIB=MBEDTLS_2_4_0 -c crypt.c -o crypt.o
cc -pedantic -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Os -g3 -std=gnu99 -DGIT_REV=\"0\" -DAVL_5XLINKED -DDEBUG_MALLOC -DCORE_LIMIT=20000 -DCRYPTLIB=MBEDTLS_2_4_0 -c sec.c -o sec.o
cc -pedantic -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Os -g3 -std=gnu99 -DGIT_REV=\"0\" -DAVL_5XLINKED -DDEBUG_MALLOC -DCORE_LIMIT=20000 -DCRYPTLIB=MBEDTLS_2_4_0 -c content.c -o content.o
cc -pedantic -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Os -g3 -std=gnu99 -DGIT_REV=\"0\" -DAVL_5XLINKED -DDEBUG_MALLOC -DCORE_LIMIT=20000 -DCRYPTLIB=MBEDTLS_2_4_0 -c msg.c -o msg.o
cc -pedantic -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Os -g3 -std=gnu99 -DGIT_REV=\"0\" -DAVL_5XLINKED -DDEBUG_MALLOC -DCORE_LIMIT=20000 -DCRYPTLIB=MBEDTLS_2_4_0 -c z.c -o z.o
cc -pedantic -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Os -g3 -std=gnu99 -DGIT_REV=\"0\" -DAVL_5XLINKED -DDEBUG_MALLOC -DCORE_LIMIT=20000 -DCRYPTLIB=MBEDTLS_2_4_0 -c iid.c -o iid.o
cc -pedantic -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Os -g3 -std=gnu99 -DGIT_REV=\"0\" -DAVL_5XLINKED -DDEBUG_MALLOC -DCORE_LIMIT=20000 -DCRYPTLIB=MBEDTLS_2_4_0 -c desc.c -o desc.o
cc -pedantic -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Os -g3 -std=gnu99 -DGIT_REV=\"0\" -DAVL_5XLINKED -DDEBUG_MALLOC -DCORE_LIMIT=20000 -DCRYPTLIB=MBEDTLS_2_4_0 -c metrics.c -o metrics.o
cc -pedantic -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Os -g3 -std=gnu99 -DGIT_REV=\"0\" -DAVL_5XLINKED -DDEBUG_MALLOC -DCORE_LIMIT=20000 -DCRYPTLIB=MBEDTLS_2_4_0 -c ogm.c -o ogm.o
cc -pedantic -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Os -g3 -std=gnu99 -DGIT_REV=\"0\" -DAVL_5XLINKED -DDEBUG_MALLOC -DCORE_LIMIT=20000 -DCRYPTLIB=MBEDTLS_2_4_0 -c link.c -o link.o
cc -pedantic -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Os -g3 -std=gnu99 -DGIT_REV=\"0\" -DAVL_5XLINKED -DDEBUG_MALLOC -DCORE_LIMIT=20000 -DCRYPTLIB=MBEDTLS_2_4_0 -c iptools.c -o iptools.o
cc -pedantic -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Os -g3 -std=gnu99 -DGIT_REV=\"0\" -DAVL_5XLINKED -DDEBUG_MALLOC -DCORE_LIMIT=20000 -DCRYPTLIB=MBEDTLS_2_4_0 -c tools.c -o tools.o
cc -pedantic -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Os -g3 -std=gnu99 -DGIT_REV=\"0\" -DAVL_5XLINKED -DDEBUG_MALLOC -DCORE_LIMIT=20000 -DCRYPTLIB=MBEDTLS_2_4_0 -c plugin.c -o plugin.o
cc -pedantic -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Os -g3 -std=gnu99 -DGIT_REV=\"0\" -DAVL_5XLINKED -DDEBUG_MALLOC -DCORE_LIMIT=20000 -DCRYPTLIB=MBEDTLS_2_4_0 -c list.c -o list.o
cc -pedantic -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Os -g3 -std=gnu99 -DGIT_REV=\"0\" -DAVL_5XLINKED -DDEBUG_MALLOC -DCORE_LIMIT=20000 -DCRYPTLIB=MBEDTLS_2_4_0 -c allocate.c -o allocate.o
cc -pedantic -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Os -g3 -std=gnu99 -DGIT_REV=\"0\" -DAVL_5XLINKED -DDEBUG_MALLOC -DCORE_LIMIT=20000 -DCRYPTLIB=MBEDTLS_2_4_0 -c avl.c -o avl.o
cc -pedantic -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Os -g3 -std=gnu99 -DGIT_REV=\"0\" -DAVL_5XLINKED -DDEBUG_MALLOC -DCORE_LIMIT=20000 -DCRYPTLIB=MBEDTLS_2_4_0 -c hna.c -o hna.o
cc -pedantic -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Os -g3 -std=gnu99 -DGIT_REV=\"0\" -DAVL_5XLINKED -DDEBUG_MALLOC -DCORE_LIMIT=20000 -DCRYPTLIB=MBEDTLS_2_4_0 -c control.c -o control.o
cc -pedantic -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Os -g3 -std=gnu99 -DGIT_REV=\"0\" -DAVL_5XLINKED -DDEBUG_MALLOC -DCORE_LIMIT=20000 -DCRYPTLIB=MBEDTLS_2_4_0 -c schedule.c -o schedule.o
In file included from schedule.c:30:
schedule.c: In function ‘wait4Event’:
bmx.h:464:24: warning: macro expands to multiple statements [-Wmultistatement-macros]
#define timercpy(d, a) (d)->tv_sec = (a)->tv_sec; (d)->tv_usec = (a)->tv_usec;
^
schedule.c:457:6: note: in expansion of macro ‘timercpy’
timercpy(&(pb.i.tv_stamp), tv_stamp);
^~~~~~~~
schedule.c:456:5: note: some parts of macro expansion are not guarded by this ‘else’ clause
else
^~~~
cc -pedantic -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Os -g3 -std=gnu99 -DGIT_REV=\"0\" -DAVL_5XLINKED -DDEBUG_MALLOC -DCORE_LIMIT=20000 -DCRYPTLIB=MBEDTLS_2_4_0 -c ip.c -o ip.o
cc -pedantic -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Os -g3 -std=gnu99 -DGIT_REV=\"0\" -DAVL_5XLINKED -DDEBUG_MALLOC -DCORE_LIMIT=20000 -DCRYPTLIB=MBEDTLS_2_4_0 -c prof.c -o prof.o
prof.c:88:5: warning: ‘prof_check’ defined but not used [-Wunused-function]
int prof_check(struct prof_ctx *p, int childs)
^~~~~~~~~~
cc bmx.o key.o node.o crypt.o sec.o content.o msg.o z.o iid.o desc.o metrics.o ogm.o link.o iptools.o tools.o plugin.o list.o allocate.o avl.o hna.o control.o schedule.o ip.o prof.o -o bmx7 -g3 -Wl,-export-dynamic -ldl -liw -lz -lm -lmbedcrypto
make[1]: Verzeichnis „/home/setup/bmx7/src“ wird verlassen
# further make targets: help, libs, build_all, strip[_libs|_all], install[_libs|_all], clean[_libs|_all]
It's working now. Don't know exactly what was wrong, maybe the fact that I had mbedtls 2.4 installed from sources as well as this libmbedtls-dev via dpkg1, dunno exactly. Apart from that I also tried mbedtls 2.16 but that didn't work either.
Is bmx7 supposed to compile on Debian, too? I tried to compile it and after meeting the requirements it installed into /usr/sbin/bmx7 after make install. Sadly when I invoke bmx7 I get
bmx7 --help Bus error (core dumped)
I tried this one release bmx7-7.1.0.tar.gz and I tried commit 91d6651ccb5a563d4752f719f7a892512079093d. The result is always the same.
This is how I built:
make EXTRA_CFLAGS="-DCRYPTLIB=MBEDTLS_2_4_0"