OVP Forums - A community of assistance, help, questions, and answers.
|
View previous topic :: View next topic |
Author |
Message |
IztokJeras
Joined: 07 Nov 2018 Posts: 5
|
Posted: Sat Nov 17, 2018 12:37 pm Post subject: compiling Examples on Ubuntu 18.04 |
|
|
I get the next error while compiling Examples/SimulationControl/customProcessorTrace:
Code: |
$ make -C module --trace
make: Entering directory '/home/izi/Workplace/Imperas.20180716/customProcessorTrace/module'
/home/izi/Workplace/Imperas.20180716/ImperasLib/buildutils/Makefile.module:102: update target 'obj/Linux32/module.d' due to: module.c
echo "# Host Depending obj/Linux32/module.d"
# Host Depending obj/Linux32/module.d
mkdir -p obj/Linux32
gcc -MM module.c -I/home/izi/Workplace/Imperas.20180716/ImpPublic/include/host -I/home/izi/Workplace/Imperas.20180716/ImpProprietary/include/host -Wall -Werror -O0 -g -gdwarf-2 -m32 -MT obj/Linux32/module.o -MF obj/Linux32/module.d
In file included from module.c:30:0:
/usr/include/string.h:36:42: error: missing binary operator before token "("
#if defined __cplusplus && __GNUC_PREREQ (4, 4)
^
/usr/include/string.h:164:21: error: missing binary operator before token "("
|| __GLIBC_USE (LIB_EXT2))
^
/usr/include/string.h:173:43: error: missing binary operator before token "("
#if defined __USE_XOPEN2K8 || __GLIBC_USE (LIB_EXT2)
|
Is this by any chance a known issue? C++ is not my forte, so I did not start debugging it myself yet. For now my estimate is, this is a compiler version issue.
Regards,
Iztok Jeras |
|
Back to top |
|
 |
IztokJeras
Joined: 07 Nov 2018 Posts: 5
|
Posted: Sun Nov 18, 2018 5:45 am Post subject: |
|
|
If only the first GCC command is executed with -H produces:
Code: |
$ gcc -MM module.c -I/home/izi/Workplace/Imperas.20180716/ImpPublic/include/host -I/home/izi/Workplace/Imperas.20180716/ImpProprietary/include/host -Wall -Werror -O0 -g -gdwarf-2 -m32 -MT obj/Linux32/module.o -MF obj/Linux32/module.d -H
. /usr/include/string.h
.. /usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h
In file included from module.c:30:0:
/usr/include/string.h:36:42: error: missing binary operator before token "("
#if defined __cplusplus && __GNUC_PREREQ (4, 4)
^
/usr/include/string.h:164:21: error: missing binary operator before token "("
|| __GLIBC_USE (LIB_EXT2))
^
/usr/include/string.h:173:43: error: missing binary operator before token "("
#if defined __USE_XOPEN2K8 || __GLIBC_USE (LIB_EXT2)
^
/usr/include/string.h:491:19: error: missing binary operator before token "("
#if __GNUC_PREREQ (3,4)
^
. /usr/include/stdlib.h
.. /usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h
|
If only the -m32 option is removed the code compiles well:
Code: |
$ gcc -MM module.c -I/home/izi/Workplace/Imperas.20180716/ImpPublic/include/host -I/home/izi/Workplace/Imperas.20180716/ImpProprietary/include/host -Wall -Werror -O0 -g -gdwarf-2 -MT obj/Linux32/module.o -MF obj/Linux32/module.d -H
. /usr/include/string.h
.. /usr/include/x86_64-linux-gnu/bits/libc-header-start.h
... /usr/include/features.h
.... /usr/include/x86_64-linux-gnu/sys/cdefs.h
..... /usr/include/x86_64-linux-gnu/bits/wordsize.h
..... /usr/include/x86_64-linux-gnu/bits/long-double.h
.... /usr/include/x86_64-linux-gnu/gnu/stubs.h
..... /usr/include/x86_64-linux-gnu/gnu/stubs-64.h
.. /usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h
.. /usr/include/x86_64-linux-gnu/bits/types/locale_t.h
... /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h
.. /usr/include/strings.h
... /usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h
. /usr/include/stdlib.h
...
|
I now tried to install:
Code: |
sudo apt-get install gcc-multilib g++-multilib
|
And it seems to work now. |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Information regarding OVP © 2008-2022 Imperas Software
|