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

Build errors - cbench on Ubuntu 22.04 #13

Closed
askb opened this issue Oct 13, 2024 · 1 comment
Closed

Build errors - cbench on Ubuntu 22.04 #13

askb opened this issue Oct 13, 2024 · 1 comment

Comments

@askb
Copy link

askb commented Oct 13, 2024

I see build errora with make while trying to run cbench on Ubuntu 22.04.

    openstack.mininet-ovs-28: fatal: [default]: FAILED! => {
    openstack.mininet-ovs-28:     "changed": true,
    openstack.mininet-ovs-28:     "cmd": [
    openstack.mininet-ovs-28:         "make"
    openstack.mininet-ovs-28:     ],
    openstack.mininet-ovs-28:     "delta": "0:00:00.533378",
    openstack.mininet-ovs-28:     "end": "2024-10-11 23:31:51.099065",
    openstack.mininet-ovs-28:     "rc": 2,
    openstack.mininet-ovs-28:     "start": "2024-10-11 23:31:50.565687"
    openstack.mininet-ovs-28: }
    openstack.mininet-ovs-28: 
    openstack.mininet-ovs-28: STDOUT:
    openstack.mininet-ovs-28: 
    openstack.mininet-ovs-28: gcc -DHAVE_CONFIG_H -I. -I..     -g -O2 -Wall -I/tmp/mtcbench/oflops/../openflow//include -Wshadow -MT myargs.o -MD -MP -MF .deps/myargs.Tpo -c -o myargs.o myargs.c
    openstack.mininet-ovs-28: mv -f .deps/myargs.Tpo .deps/myargs.Po
    openstack.mininet-ovs-28: gcc -DHAVE_CONFIG_H -I. -I..     -g -O2 -Wall -I/tmp/mtcbench/oflops/../openflow//include -Wshadow -MT cbench.o -MD -MP -MF .deps/cbench.Tpo -c -o cbench.o cbench.c
    openstack.mininet-ovs-28: mv -f .deps/cbench.Tpo .deps/cbench.Po
    openstack.mininet-ovs-28: gcc -DHAVE_CONFIG_H -I. -I..     -g -O2 -Wall -I/tmp/mtcbench/oflops/../openflow//include -Wshadow -MT fakeswitch.o -MD -MP -MF .deps/fakeswitch.Tpo -c -o fakeswitch.o fakeswitch.c
    openstack.mininet-ovs-28: mv -f .deps/fakeswitch.Tpo .deps/fakeswitch.Po
    openstack.mininet-ovs-28: /bin/bash ../libtool  --tag=CC   --mode=link gcc  -g -O2 -Wall -I/tmp/mtcbench/oflops/../openflow//include -Wshadow  -L.. -static -lm -loflops_test -o cbench myargs.o cbench.o fakeswitch.o  
    openstack.mininet-ovs-28: libtool: link: gcc -g -O2 -Wall -I/tmp/mtcbench/oflops/../openflow//include -Wshadow -o cbench myargs.o cbench.o fakeswitch.o  -L.. -lm -loflops_test
    openstack.mininet-ovs-28: 
    openstack.mininet-ovs-28: 
    openstack.mininet-ovs-28: STDERR:
    openstack.mininet-ovs-28: 
    openstack.mininet-ovs-28: cbench.c: In function ‘run_test’:
    openstack.mininet-ovs-28: cbench.c:196:16: warning: unused variable ‘tmNow’ [-Wunused-variable]
    openstack.mininet-ovs-28:   196 |     struct tm *tmNow;
    openstack.mininet-ovs-28:       |                ^~~~~
    openstack.mininet-ovs-28: cbench.c:195:12: warning: unused variable ‘tNow’ [-Wunused-variable]
    openstack.mininet-ovs-28:   195 |     time_t tNow;
    openstack.mininet-ovs-28:       |            ^~~~
    openstack.mininet-ovs-28: cbench.c:190:12: warning: unused variable ‘passed’ [-Wunused-variable]
    openstack.mininet-ovs-28:   190 |     double passed;
    openstack.mininet-ovs-28:       |            ^~~~~~
    openstack.mininet-ovs-28: cbench.c: In function ‘timeout_connect’:
    openstack.mininet-ovs-28: cbench.c:325:13: warning: unused variable ‘nfds’ [-Wunused-variable]
    openstack.mininet-ovs-28:   325 |         int nfds = epoll_wait(epollfd, &ev, 1, mstimeout);
    openstack.mininet-ovs-28:       |             ^~~~
    openstack.mininet-ovs-28: cbench.c:257:20: warning: variable ‘tv’ set but not used [-Wunused-but-set-variable]
    openstack.mininet-ovs-28:   257 |     struct timeval tv;
    openstack.mininet-ovs-28:       |                    ^~
    openstack.mininet-ovs-28: cbench.c:256:12: warning: unused variable ‘fds’ [-Wunused-variable]
    openstack.mininet-ovs-28:   256 |     fd_set fds;
    openstack.mininet-ovs-28:       |            ^~~
    openstack.mininet-ovs-28: cbench.c:254:9: warning: unused variable ‘ret’ [-Wunused-variable]
    openstack.mininet-ovs-28:   254 |     int ret = 0;
    openstack.mininet-ovs-28:       |         ^~~
    openstack.mininet-ovs-28: cbench.c: In function ‘cbench_thread’:
    openstack.mininet-ovs-28: cbench.c:471:13: warning: variable ‘v’ set but not used [-Wunused-but-set-variable]
    openstack.mininet-ovs-28:   471 |     double  v;
    openstack.mininet-ovs-28:       |             ^
    openstack.mininet-ovs-28: cbench.c:456:13: warning: unused variable ‘k’ [-Wunused-variable]
    openstack.mininet-ovs-28:   456 |     int i,j,k;
    openstack.mininet-ovs-28:       |             ^
    openstack.mininet-ovs-28: fakeswitch.c: In function ‘fakeswitch_handle_io’:
    openstack.mininet-ovs-28: fakeswitch.c:565:36: warning: passing argument 4 of ‘fakeswitch_handle_read’ discards ‘volatile’ qualifier from pointer target type [-Wdiscarded-qualifiers]
    openstack.mininet-ovs-28:   565 |                                args->threads_started,
    openstack.mininet-ovs-28:       |                                ~~~~^~~~~~~~~~~~~~~~~
    openstack.mininet-ovs-28: fakeswitch.c:352:34: note: expected ‘int *’ but argument is of type ‘volatile int *’
    openstack.mininet-ovs-28:   352 |                             int* threads_started,
    openstack.mininet-ovs-28:       |                             ~~~~~^~~~~~~~~~~~~~~
    openstack.mininet-ovs-28: fakeswitch.c:571:37: warning: passing argument 2 of ‘fakeswitch_handle_write’ discards ‘volatile’ qualifier from pointer target type [-Wdiscarded-qualifiers]
    openstack.mininet-ovs-28:   571 |                                 args->threads_started,
    openstack.mininet-ovs-28:       |                                 ~~~~^~~~~~~~~~~~~~~~~
    openstack.mininet-ovs-28: fakeswitch.c:507:42: note: expected ‘int *’ but argument is of type ‘volatile int *’
    openstack.mininet-ovs-28:   507 |                                     int* threads_started,
    openstack.mininet-ovs-28:       |                                     ~~~~~^~~~~~~~~~~~~~~
    openstack.mininet-ovs-28: /usr/bin/ld: cannot find -loflops_test: No such file or directory
    openstack.mininet-ovs-28: collect2: error: ld returned 1 exit status
    openstack.mininet-ovs-28: make: *** [Makefile:388: cbench] Error 1
    openstack.mininet-ovs-28: 
    openstack.mininet-ovs-28: 
    openstack.mininet-ovs-28: MSG:
    openstack.mininet-ovs-28: 
    openstack.mininet-ovs-28: non-zero return code
@askb
Copy link
Author

askb commented Oct 17, 2024

The solution is to update the Makefile.am:

LDADD=-ldl -lpcap -lnetsnmp -loflops_test

to

LDADD=-ldl -lpcap -lnetsnmp liboflops_test.la

@askb askb closed this as completed Oct 17, 2024
odl-github pushed a commit to opendaylight/releng-builder that referenced this issue Oct 18, 2024
ODL CIST jobs require and updated version of OVS 2.17.11
supported on Ubuntu 22.04.

Update packer jobs to build the latest version of packer
image. Cleanup the unused platforms and provision files.

A workaround has been added to build MT-cbench since the
repo is not been maintained for a long time.

Ref: intracom-telecom-sdn/mtcbench#13
Change-Id: I4f819e918f15d16362523b0838cc0e5fd69cc33a
Signed-off-by: Anil Belur <[email protected]>
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

1 participant