viabtc / viabtc_exchange_server

A trading engine with high-speed performance and real-time notification
MIT License
2.68k stars 1.48k forks source link

make -C accesshttp 编译失败是什么问题? #151

Closed chencore closed 5 years ago

chencore commented 5 years ago
chenke@ubuntu:~/viabtc_exchange_server$ sudo make -C accesshttp 
make: Entering directory '/home/chenke/viabtc_exchange_server/accesshttp'
gcc -Wall -Wno-strict-aliasing -Wno-uninitialized -g -rdynamic -std=gnu99 -c -o ah_config.o ah_config.c -I ../network -I ../utils -I ../depends
gcc -Wall -Wno-strict-aliasing -Wno-uninitialized -g -rdynamic -std=gnu99 -c -o ah_main.o ah_main.c -I ../network -I ../utils -I ../depends
gcc -Wall -Wno-strict-aliasing -Wno-uninitialized -g -rdynamic -std=gnu99 -c -o ah_listener.o ah_listener.c -I ../network -I ../utils -I ../depends
gcc -Wall -Wno-strict-aliasing -Wno-uninitialized -g -rdynamic -std=gnu99 -c -o ah_server.o ah_server.c -I ../network -I ../utils -I ../depends
gcc -g -rdynamic -o accesshttp.exe  ah_config.o  ah_main.o  ah_listener.o  ah_server.o -L ../utils -lutils -L ../network -lnetwork -L ../depends/hiredis -Wl,-Bstatic -lev -ljansson -lmpdec -lrdkafka -lz -lssl -lcrypto -lhiredis -lcurl -Wl,-Bdynamic -lm -lpthread -ldl -lssl -lldap -llber -lgss -lgnutls -lidn -lnettle -lrtmp -lsasl2 -lmysqlclient 
/usr/bin/x86_64-linux-gnu-ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libev.a(ev.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
../makefile.inc:16: recipe for target 'accesshttp.exe' failed
make: *** [accesshttp.exe] Error 1
make: Leaving directory '/home/chenke/viabtc_exchange_server/accesshttp'
chenke@ubuntu:~/viabtc_exchange_server$ 
xtuyaowu commented 5 years ago

建了一个交易所撮合交流群: 862266237

xiaoxiaoleo commented 5 years ago

Same issue

klpeng commented 5 years ago

I had the same problem

objectt commented 5 years ago

@xiaoxiaoleo @klpeng Try adding "-no-pie" option to makefile.inc

chencore commented 5 years ago

已解决