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

Compiling against LEDE v17.01 fails #29

Open
edoput opened this issue Feb 12, 2018 · 2 comments
Open

Compiling against LEDE v17.01 fails #29

edoput opened this issue Feb 12, 2018 · 2 comments

Comments

@edoput
Copy link
Contributor

edoput commented Feb 12, 2018

Here is the output from the relevant error compiling against the EdgeRouter X

make[4]: Entering directory '/root/openwrt/build_dir/target-mipsel_24kc_musl-1.1.16/prince-v0.2'
mkdir -p prince/build/
make -C graph-parser_c/src/
make[5]: Entering directory '/root/openwrt/build_dir/target-mipsel_24kc_musl-1.1.16/prince-v0.2/graph-parser_c/src'
mkdir -p ../build/lib/
mipsel-openwrt-linux-musl-gcc -fPIC -pthread  -shared -Wl,-soname,libgraphcparser.so -o ../build/lib/libgraphcparser.so graph_parser.o brandes.o biconnected.o graph/graph.o graph/list.o  
make[5]: Leaving directory '/root/openwrt/build_dir/target-mipsel_24kc_musl-1.1.16/prince-v0.2/graph-parser_c/src'
make -C prince/src
make[5]: Entering directory '/root/openwrt/build_dir/target-mipsel_24kc_musl-1.1.16/prince-v0.2/prince/src'
cp common_c.h common.h
mipsel-openwrt-linux-musl-gcc -std=gnu11 -fPIC -D_GNU_SOURCE -o ../build/prince_c prince.o lib/ini.o parser.o -L../../graph-parser_c/build/lib -lgraphcparser -ldl -ljson-c -lm
../../graph-parser_c/build/lib/libgraphcparser.so: undefined reference to `round_decimal'
collect2: error: ld returned 1 exit status
Makefile:16: recipe for target 'prince_c' failed
make[5]: *** [prince_c] Error 1
make[5]: Leaving directory '/root/openwrt/build_dir/target-mipsel_24kc_musl-1.1.16/prince-v0.2/prince/src'
Makefile:2: recipe for target 'all' failed
make[4]: *** [all] Error 2
make[4]: Leaving directory '/root/openwrt/build_dir/target-mipsel_24kc_musl-1.1.16/prince-v0.2'
Makefile:46: recipe for target '/root/openwrt/build_dir/target-mipsel_24kc_musl-1.1.16/prince-v0.2/.built' failed
make[3]: *** [/root/openwrt/build_dir/target-mipsel_24kc_musl-1.1.16/prince-v0.2/.built] Error 2
make[3]: Leaving directory '/root/openwrt/feeds/routing/poprouting'
package/Makefile:105: recipe for target 'package/feeds/routing/poprouting/compile' failed
make[2]: *** [package/feeds/routing/poprouting/compile] Error 2
make[2]: Leaving directory '/root/openwrt'
package/Makefile:101: recipe for target '/root/openwrt/staging_dir/target-mipsel_24kc_musl-1.1.16/stamp/.package_compile' failed
make[1]: *** [/root/openwrt/staging_dir/target-mipsel_24kc_musl-1.1.16/stamp/.package_compile] Error 2
make[1]: Leaving directory '/root/openwrt'
/root/openwrt/include/toplevel.mk:197: recipe for target 'world' failed
make: *** [world] Error 2

I'm attaching the config file to reproduce this build

config

@gabri94
Copy link
Member

gabri94 commented Mar 22, 2018

I think this is similar to a previous issue with static inline function like the one producing the bug:

static inline double round_decimal(double d){
    return roundf(d*decimal_places)/decimal_places;
}

Removing one of the two definition should fix the problem.

@gabri94
Copy link
Member

gabri94 commented Mar 22, 2018

see min(int a, int b) function in the graph_parser_c library

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

No branches or pull requests

2 participants