Gwinel / likwid

Automatically exported from code.google.com/p/likwid
GNU General Public License v3.0
0 stars 0 forks source link

problem with compiling #56

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.linking

What is the expected output? What do you see instead?
I cannot install likwid-2.3 on my machine. I got error messages when running 
'make'.

What version of the product are you using? On what operating system?
likwid-2.3 on Red Hat Enterprise Linux Client release 5.7

Please provide any additional information below.
Here is the detailed output when running make:

===>  LINKING  likwid-perfctr
./GCC/perfmon.o: In function `power_read':
/likwid/likwid-2.3/./src/includes/power.h:64: multiple definition of 
`power_read'
./GCC/libperfctr.o:/likwid/likwid-2.3/./src/includes/power.h:64: first defined 
here
./GCC/perfmon.o: In function `power_stop':
/likwid/likwid-2.3/./src/includes/power.h:58: multiple definition of 
`power_stop'
./GCC/libperfctr.o:/likwid/likwid-2.3/./src/includes/power.h:58: first defined 
here
./GCC/perfmon.o: In function `power_start':
/likwid/likwid-2.3/./src/includes/power.h:52: multiple definition of 
`power_start'
./GCC/libperfctr.o:/likwid/likwid-2.3/./src/includes/power.h:52: first defined 
here
./GCC/power.o: In function `power_read':
/likwid/likwid-2.3/./src/includes/power.h:64: multiple definition of 
`power_read'
./GCC/libperfctr.o:/likwid/likwid-2.3/./src/includes/power.h:64: first defined 
here
./GCC/power.o: In function `power_stop':
/likwid/likwid-2.3/./src/includes/power.h:58: multiple definition of 
`power_stop'
./GCC/libperfctr.o:/likwid/likwid-2.3/./src/includes/power.h:58: first defined 
here
./GCC/power.o: In function `power_start':
/likwid/likwid-2.3/./src/includes/power.h:52: multiple definition of 
`power_start'
./GCC/libperfctr.o:/likwid-2.3/./src/includes/power.h:52: first defined here
collect2: ld returned 1 exit status
make: *** [likwid-perfctr] Error 1

Original issue reported on code.google.com by zhengfan...@gmail.com on 8 Feb 2012 at 10:07

GoogleCodeExporter commented 9 years ago
The problem here is that power.h includes inline functions which need a c99 
standard comliant C compiler. I will probably remove the inlining functions to 
prevent problems.

Original comment by jan.trei...@gmail.com on 8 Feb 2012 at 10:20

GoogleCodeExporter commented 9 years ago
Can you give me more information on the compiler. E.g. gcc --version

It cleanly compiles on a Suse installation with gcc 4.1.2. RH 5.7 should have 
also gcc 4.1.2.

Original comment by jan.trei...@gmail.com on 9 Feb 2012 at 9:25

GoogleCodeExporter commented 9 years ago
I changed the inline functions now to inline static.
Hope this works with older compilers.
Tested on gcc 4.1 and open64 compilers.

Original comment by jan.trei...@gmail.com on 19 Mar 2012 at 8:45