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

compile example error #11

Open
alvinkwok1 opened this issue Aug 15, 2017 · 5 comments
Open

compile example error #11

alvinkwok1 opened this issue Aug 15, 2017 · 5 comments

Comments

@alvinkwok1
Copy link

[root@localhost midstat]# make
CC ../../core/lib/libmtcp.a
/usr/bin/ld: edges: TLS definition in ../../core/lib/libmtcp.a(sf_optimize.o) section .tbss mismatches non-TLS definition in /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libpcap.so section .bss
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libpcap.so: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make: *** [midstat] Error 1I can compile successfully

Hi,
when I use option "./setup.sh --compile-pcap",I can compile successfully. But use option "./setup.sh --compile-dpdk", I can't compile all examples. I'm sure mOS is compile successfully.

@ajamshed
Copy link
Member

Hi fruitdish,

I have not really seen this error before. Can you please share with me your environment settings (OS, gcc version, etc.)? I would also suggest that you try upgrading your gcc to a newer version and verify whether you are able to compile mOS with it. Thanks.

@alvinkwok1
Copy link
Author

Hi jamshed,
I build a CentOS system in virtual machine

kernel version : 3.10.0-514.26.2.el7.x86_64
gcc version : gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11)
glibc version : GNU ld version 2.25.1-22.base.el7
dpdk version : dpdk-16.11

I can capture packets through DPDK and compile mOS is successful !

Done with DPDK setup. Press enter to start MOS setup ...
Start building up the MOS library
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for ranlib... ranlib
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking linux/sched.h usability... yes
checking linux/sched.h presence... yes
checking for linux/sched.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking numa.h usability... yes
checking numa.h presence... yes
checking for numa.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for inttypes.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for inline... inline
checking for off_t... yes
checking for size_t... yes
checking for ssize_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint8_t... yes
checking whether lstat correctly handles trailing slash... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for ftruncate... yes
checking for gettimeofday... yes
checking for memset... yes
checking for strcasecmp... yes
checking for strchr... yes
checking for strpbrk... yes
checking for strrchr... yes
checking for strstr... yes
configure: creating ./config.status
config.status: creating ../core/src/Makefile
configure: creating ./config.status
config.status: creating ../core/src/Makefile
config.status: creating ../samples/epserver/Makefile
configure: creating ./config.status
config.status: creating ../core/src/Makefile
config.status: creating ../samples/epserver/Makefile
config.status: creating ../samples/epwget/Makefile
configure: creating ./config.status
config.status: creating ../core/src/Makefile
config.status: creating ../samples/epserver/Makefile
config.status: creating ../samples/epwget/Makefile
config.status: creating ../samples/midstat/Makefile
configure: creating ./config.status
config.status: creating ../core/src/Makefile
config.status: creating ../samples/epserver/Makefile
config.status: creating ../samples/epwget/Makefile
config.status: creating ../samples/midstat/Makefile
config.status: creating ../samples/simple_firewall/Makefile
configure: creating ./config.status
config.status: creating ../core/src/Makefile
config.status: creating ../samples/epserver/Makefile
config.status: creating ../samples/epwget/Makefile
config.status: creating ../samples/midstat/Makefile
config.status: creating ../samples/simple_firewall/Makefile
config.status: creating ../samples/nat/Makefile
rm -f ../lib/*
rm -f .o *~ core
rm -rf .
.d tags .bpf
CC core.c
CC tcp_stream.c
CC config.c
CC api.c
CC mos_api.c
CC eventpoll.c
CC socket.c
CC pipe.c
CC tcp_util.c
CC eth_in.c
CC ip_in.c
CC tcp.c
CC tcp_in.c
CC eth_out.c
CC ip_out.c
CC tcp_out.c
CC arp.c
CC timer.c
CC cpu.c
CC util.c
CC addr_pool.c
CC fhash.c
CC memory_mgt.c
CC logger.c
CC debug.c
CC tcp_rb_frag_queue.c
CC tcp_send_buffer.c
CC tcp_sb_queue.c
CC tcp_stream_queue.c
CC bpf/sf_bpf_filter.c
CC bpf/sfbpf-int.c
CC bpf/sf_gencode.c
CC bpf/sf_grammar.c
CC bpf/sf_nametoaddr.c
CC bpf/sf_optimize.c
CC bpf/sf_scanner.c
CC event_callback.c
CC tcp_rb.c
CC icmp.c
CC scalable_event.c
CC key_value_store.c
CC dpdk_module.c
mkdir -p ../lib
AR libmtcp.a
ar: creating ../lib/libmtcp.a
a - core.o
a - tcp_stream.o
a - config.o
a - api.o
a - mos_api.o
a - eventpoll.o
a - socket.o
a - pipe.o
a - tcp_util.o
a - eth_in.o
a - ip_in.o
a - tcp.o
a - tcp_in.o
a - eth_out.o
a - ip_out.o
a - tcp_out.o
a - arp.o
a - timer.o
a - cpu.o
a - util.o
a - addr_pool.o
a - fhash.o
a - memory_mgt.o
a - logger.o
a - debug.o
a - tcp_rb_frag_queue.o
a - tcp_send_buffer.o
a - tcp_sb_queue.o
a - tcp_stream_queue.o
a - bpf/sf_bpf_filter.o
a - bpf/sfbpf-int.o
a - bpf/sf_gencode.o
a - bpf/sf_grammar.o
a - bpf/sf_nametoaddr.o
a - bpf/sf_optimize.o
a - bpf/sf_scanner.o
a - event_callback.o
a - tcp_rb.o
a - icmp.o
a - scalable_event.o
a - key_value_store.o
a - dpdk_module.o


Done with MOS library setup

@ajamshed
Copy link
Member

So what was the problem in the first place? Also, we have not tested mOS in a virtualized environment. We first suggest you test out mOS on bare metal machines. Thanks.

@MikeCreken
Copy link

kernel version : 3.16.57
gcc version : gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11)
glibc version : GNU ld version 2.25.1-22.base.el7
dpdk version : dpdk-16.11
Hi,
when I use option "./setup.sh --compile-pcap",I can compile successfully. But use option "./setup.sh --compile-dpdk", I can't compile all examples. I'm sure mOS is compile successfully.
errors follows:
CC ../../core/lib/libmtcp.a
/usr/bin/ld: unrecognized option '-Wl'
/usr/bin/ld: use the --help option for usage information
collect2: error: ld returned 1 exit status
make: *** [midstat] Error 1
Thanks for your replay

@ajamshed
Copy link
Member

@MikeCreken,

Can you please set V=1 in the midstat Makefile and recompile? I will like to see the full output of the gcc compilation/linking command.

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

3 participants