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

Concurrency issue when compiling with 16 cores (libethercat.la is not compiled but test build requiring it is started) #10

Open
Minipada opened this issue Oct 25, 2018 · 0 comments
Labels

Comments

@Minipada
Copy link
Contributor

Description

I encountered issue when building on a system with 16 cores.
When reaching libethercat_wrapper folder, it sometimes fail. It seems compilation of a test requiring "libethercat_wrapper.la" is started while it has not yet been compiled.
When continuing the build after this failure, it works properly. There's something wrong in the generated Makefile right now.

Steps to reproduce the issue:

  1. Have a system with 16 cores (it may require less though, I didn't test)
  2. ./bootstrap
  3. ./configure --enable-sii-assign --disable-8139too --enable-hrtimer --enable-cycles
  4. make -j 16 all

Possible Solution

One way to go around the problem is to make using make -j1, where in this case it does not happen.

Current Behavior:

| Making all in libethercat_wrapper
| make[2]: Entering directory '/home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0/git/libethercat_wrapper'
| ../x86_64-poky-linux-libtool  --tag=CC   --mode=compile x86_64-poky-linux-gcc  -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse --sysroot=/home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0/recipe-sysroot -DHAVE_CONFIG_H -I. -I..    -I.. -I../include -Iinclude --std=c99 -D_XOPEN_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -DVERSIONING=@LIBETHERCAT_WRAPPERVERSION@ -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0=/usr/src/debug/etherlab-ethercat-master/1.0-r0 -fdebug-prefix-map=/home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0/recipe-sysroot= -fdebug-prefix-map=/home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0/recipe-sysroot-native=  -c -o src/libethercat_wrapper_la-slave.lo `test -f 'src/slave.c' || echo './'`src/slave.c
| ../x86_64-poky-linux-libtool  --tag=CC   --mode=compile x86_64-poky-linux-gcc  -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse --sysroot=/home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0/recipe-sysroot -DHAVE_CONFIG_H -I. -I..    -I.. -I../include -Iinclude --std=c99 -D_XOPEN_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -DVERSIONING=@LIBETHERCAT_WRAPPERVERSION@ -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0=/usr/src/debug/etherlab-ethercat-master/1.0-r0 -fdebug-prefix-map=/home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0/recipe-sysroot= -fdebug-prefix-map=/home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0/recipe-sysroot-native=  -c -o src/libethercat_wrapper_la-ethercat_wrapper.lo `test -f 'src/ethercat_wrapper.c' || echo './'`src/ethercat_wrapper.c
| x86_64-poky-linux-gcc  -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse --sysroot=/home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0/recipe-sysroot -DHAVE_CONFIG_H -I. -I..    --std=c99 -I../include -Iinclude -g  -D_XOPEN_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0=/usr/src/debug/etherlab-ethercat-master/1.0-r0 -fdebug-prefix-map=/home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0/recipe-sysroot= -fdebug-prefix-map=/home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0/recipe-sysroot-native=  -c -o src/testlib-testlib.o `test -f 'src/testlib.c' || echo './'`src/testlib.c
| In file included from /home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0/recipe-sysroot/usr/include/sys/time.h:21:0,
|                  from include/commons.h:13,
|                  from src/testlib.c:35:
| /home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0/recipe-sysroot/usr/include/features.h:184:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
|  # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
|    ^~~~~~~
| x86_64-poky-linux-libtool: compile:  x86_64-poky-linux-gcc -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse --sysroot=/home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0/recipe-sysroot -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -Iinclude --std=c99 -D_XOPEN_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -DVERSIONING=@LIBETHERCAT_WRAPPERVERSION@ -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0=/usr/src/debug/etherlab-ethercat-master/1.0-r0 -fdebug-prefix-map=/home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0/recipe-sysroot= -fdebug-prefix-map=/home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0/recipe-sysroot-native= -c src/slave.c  -fPIC -DPIC -o src/.libs/libethercat_wrapper_la-slave.o
| x86_64-poky-linux-libtool: compile:  x86_64-poky-linux-gcc -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse --sysroot=/home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0/recipe-sysroot -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -Iinclude --std=c99 -D_XOPEN_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -DVERSIONING=@LIBETHERCAT_WRAPPERVERSION@ -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0=/usr/src/debug/etherlab-ethercat-master/1.0-r0 -fdebug-prefix-map=/home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0/recipe-sysroot= -fdebug-prefix-map=/home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0/recipe-sysroot-native= -c src/ethercat_wrapper.c  -fPIC -DPIC -o src/.libs/libethercat_wrapper_la-ethercat_wrapper.o
| In file included from /home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0/recipe-sysroot/usr/include/bits/libc-header-start.h:33:0,
|                  from /home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0/recipe-sysroot/usr/include/stdlib.h:25,
|                  from ../include/ecrt.h:128,
|                  from include/ethercat_wrapper_slave.h:14,
|                  from include/slave.h:10,
|                  from src/slave.c:9:
| /home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0/recipe-sysroot/usr/include/features.h:184:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
|  # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
|    ^~~~~~~
| In file included from /home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0/recipe-sysroot/usr/include/bits/libc-header-start.h:33:0,
|                  from /home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0/recipe-sysroot/usr/include/stdlib.h:25,
|                  from ../include/ecrt.h:128,
|                  from include/ethercat_wrapper_slave.h:14,
|                  from include/ethercat_wrapper.h:12,
|                  from src/ethercat_wrapper.c:5:
| /home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0/recipe-sysroot/usr/include/features.h:184:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
|  # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
|    ^~~~~~~
| ../x86_64-poky-linux-libtool  --tag=CC   --mode=link x86_64-poky-linux-gcc  -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse --sysroot=/home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0/recipe-sysroot --std=c99 -I../include -Iinclude -g  -D_XOPEN_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0=/usr/src/debug/etherlab-ethercat-master/1.0-r0 -fdebug-prefix-map=/home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0/recipe-sysroot= -fdebug-prefix-map=/home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0/recipe-sysroot-native=  -static -L.libs -L../lib/.libs  -L. -lethercat_wrapper  -lethercat -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -o testlib src/testlib-testlib.o
| x86_64-poky-linux-libtool: link: x86_64-poky-linux-gcc -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse --sysroot=/home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0/recipe-sysroot --std=c99 -I../include -Iinclude -g -D_XOPEN_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0=/usr/src/debug/etherlab-ethercat-master/1.0-r0 -fdebug-prefix-map=/home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0/recipe-sysroot= -fdebug-prefix-map=/home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0/recipe-sysroot-native= -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -o testlib src/testlib-testlib.o  -L.libs -L../lib/.libs -L. -lethercat_wrapper /home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0/git/lib/.libs/libethercat.so
| /home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0/recipe-sysroot-native/usr/bin/x86_64-poky-linux/../../libexec/x86_64-poky-linux/gcc/x86_64-poky-linux/7.3.0/ld: cannot find -lethercat_wrapper
| collect2: error: ld returned 1 exit status
| Makefile:483: recipe for target 'testlib' failed
| make[2]: *** [testlib] Error 1
| make[2]: *** Waiting for unfinished jobs....
| make[2]: Leaving directory '/home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0/git/libethercat_wrapper'
| Makefile:509: recipe for target 'all-recursive' failed
| make[1]: *** [all-recursive] Error 1
| make[1]: Leaving directory '/home/build/data/tmp/work/qemux86_64-poky-linux/etherlab-ethercat-master/1.0-r0/git'
| Makefile:435: recipe for target 'all' failed
| make: *** [all] Error 2
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
@Minipada Minipada added the bug label Oct 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant