libcpuid, openSUSE

Asked by DAP

Hello.
I failed to build required libcpuid:

[ 6s] + cd libcpuid-0.1.0
[ 6s] + CFLAGS='-fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables'
[ 6s] + export CFLAGS
[ 6s] + CXXFLAGS='-fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables'
[ 6s] + export CXXFLAGS
[ 6s] + FFLAGS='-fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables'
[ 6s] + export FFLAGS
[ 6s] + ./configure --host=x86_64-suse-linux-gnu --build=x86_64-suse-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/lib --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --disable-dependency-tracking
[ 6s] checking for a BSD-compatible install... /usr/bin/install -c
[ 7s] checking whether build environment is sane... yes
[ 7s] checking for gawk... gawk
[ 7s] checking whether make sets $(MAKE)... yes
[ 7s] checking for x86_64-suse-linux-gnu-gcc... no
[ 7s] checking for gcc... gcc
[ 8s] checking for C compiler default output file name... a.out
[ 8s] checking whether the C compiler works... yes
[ 8s] checking whether we are cross compiling... no
[ 8s] checking for suffix of executables...
[ 8s] checking for suffix of object files... o
[ 8s] checking whether we are using the GNU C compiler... yes
[ 8s] checking whether gcc accepts -g... yes
[ 8s] checking for gcc option to accept ISO C89... none needed
[ 8s] checking for style of include used by make... GNU
[ 8s] checking dependency style of gcc... none
[ 8s] checking for an ANSI C-conforming const... yes
[ 8s] checking build system type... x86_64-suse-linux-gnu
[ 8s] checking host system type... x86_64-suse-linux-gnu
[ 8s] checking for a sed that does not truncate output... /usr/bin/sed
[ 8s] checking for grep that handles long lines and -e... /usr/bin/grep
[ 8s] checking for egrep... /usr/bin/grep -E
[ 8s] checking for ld used by gcc... /usr/x86_64-suse-linux/bin/ld
[ 8s] checking if the linker (/usr/x86_64-suse-linux/bin/ld) is GNU ld... yes
[ 8s] checking for /usr/x86_64-suse-linux/bin/ld option to reload object files... -r
[ 8s] checking for BSD-compatible nm... /usr/bin/nm -B
[ 8s] checking whether ln -s works... yes
[ 8s] checking how to recognize dependent libraries... pass_all
[ 8s] checking how to run the C preprocessor... gcc -E
[ 9s] checking for ANSI C header files... yes
[ 9s] checking for sys/types.h... yes
[ 9s] checking for sys/stat.h... yes
[ 9s] checking for stdlib.h... yes
[ 9s] checking for string.h... yes
[ 9s] checking for memory.h... yes
[ 9s] checking for strings.h... yes
[ 9s] checking for inttypes.h... yes
[ 9s] checking for stdint.h... yes
[ 9s] checking for unistd.h... yes
[ 9s] checking dlfcn.h usability... yes
[ 9s] checking dlfcn.h presence... yes
[ 9s] checking for dlfcn.h... yes
[ 9s] checking for x86_64-suse-linux-gnu-g++... no
[ 9s] checking for x86_64-suse-linux-gnu-c++... no
[ 9s] checking for x86_64-suse-linux-gnu-gpp... no
[ 9s] checking for x86_64-suse-linux-gnu-aCC... no
[ 9s] checking for x86_64-suse-linux-gnu-CC... no
[ 9s] checking for x86_64-suse-linux-gnu-cxx... no
[ 9s] checking for x86_64-suse-linux-gnu-cc++... no
[ 9s] checking for x86_64-suse-linux-gnu-cl.exe... no
[ 9s] checking for x86_64-suse-linux-gnu-FCC... no
[ 9s] checking for x86_64-suse-linux-gnu-KCC... no
[ 9s] checking for x86_64-suse-linux-gnu-RCC... no
[ 9s] checking for x86_64-suse-linux-gnu-xlC_r... no
[ 9s] checking for x86_64-suse-linux-gnu-xlC... no
[ 9s] checking for g++... g++
[ 9s] checking whether we are using the GNU C++ compiler... yes
[ 9s] checking whether g++ accepts -g... yes
[ 9s] checking dependency style of g++... none
[ 10s] checking how to run the C++ preprocessor... g++ -E
[ 10s] checking for x86_64-suse-linux-gnu-g77... no
[ 10s] checking for x86_64-suse-linux-gnu-xlf... no
[ 10s] checking for x86_64-suse-linux-gnu-f77... no
[ 10s] checking for x86_64-suse-linux-gnu-frt... no
[ 10s] checking for x86_64-suse-linux-gnu-pgf77... no
[ 10s] checking for x86_64-suse-linux-gnu-cf77... no
[ 10s] checking for x86_64-suse-linux-gnu-fort77... no
[ 10s] checking for x86_64-suse-linux-gnu-fl32... no
[ 10s] checking for x86_64-suse-linux-gnu-af77... no
[ 10s] checking for x86_64-suse-linux-gnu-xlf90... no
[ 10s] checking for x86_64-suse-linux-gnu-f90... no
[ 10s] checking for x86_64-suse-linux-gnu-pgf90... no
[ 10s] checking for x86_64-suse-linux-gnu-pghpf... no
[ 10s] checking for x86_64-suse-linux-gnu-epcf90... no
[ 10s] checking for x86_64-suse-linux-gnu-gfortran... no
[ 10s] checking for x86_64-suse-linux-gnu-g95... no
[ 10s] checking for x86_64-suse-linux-gnu-xlf95... no
[ 10s] checking for x86_64-suse-linux-gnu-f95... no
[ 10s] checking for x86_64-suse-linux-gnu-fort... no
[ 10s] checking for x86_64-suse-linux-gnu-ifort... no
[ 10s] checking for x86_64-suse-linux-gnu-ifc... no
[ 10s] checking for x86_64-suse-linux-gnu-efc... no
[ 10s] checking for x86_64-suse-linux-gnu-pgf95... no
[ 10s] checking for x86_64-suse-linux-gnu-lf95... no
[ 10s] checking for x86_64-suse-linux-gnu-ftn... no
[ 10s] checking for g77... no
[ 10s] checking for xlf... no
[ 10s] checking for f77... no
[ 10s] checking for frt... no
[ 10s] checking for pgf77... no
[ 10s] checking for cf77... no
[ 10s] checking for fort77... no
[ 10s] checking for fl32... no
[ 10s] checking for af77... no
[ 10s] checking for xlf90... no
[ 10s] checking for f90... no
[ 10s] checking for pgf90... no
[ 10s] checking for pghpf... no
[ 10s] checking for epcf90... no
[ 10s] checking for gfortran... no
[ 10s] checking for g95... no
[ 10s] checking for xlf95... no
[ 10s] checking for f95... no
[ 10s] checking for fort... no
[ 10s] checking for ifort... no
[ 10s] checking for ifc... no
[ 10s] checking for efc... no
[ 10s] checking for pgf95... no
[ 10s] checking for lf95... no
[ 10s] checking for ftn... no
[ 10s] checking whether we are using the GNU Fortran 77 compiler... no
[ 10s] checking whether accepts -g... no
[ 10s] checking the maximum length of command line arguments... 1572864
[ 10s] checking command to parse /usr/bin/nm -B output from gcc object... ok
[ 10s] checking for objdir... .libs
[ 10s] checking for x86_64-suse-linux-gnu-ar... no
[ 10s] checking for ar... ar
[ 10s] checking for x86_64-suse-linux-gnu-ranlib... no
[ 10s] checking for ranlib... ranlib
[ 10s] checking for x86_64-suse-linux-gnu-strip... no
[ 10s] checking for strip... strip
[ 10s] checking if gcc supports -fno-rtti -fno-exceptions... no
[ 10s] checking for gcc option to produce PIC... -fPIC
[ 10s] checking if gcc PIC flag -fPIC works... yes
[ 10s] checking if gcc static flag -static works... no
[ 10s] checking if gcc supports -c -o file.o... yes
[ 10s] checking whether the gcc linker (/usr/x86_64-suse-linux/bin/ld -m elf_x86_64) supports shared libraries... yes
[ 10s] checking whether -lc should be explicitly linked in... no
[ 11s] checking dynamic linker characteristics... GNU/Linux ld.so
[ 11s] checking how to hardcode library paths into programs... immediate
[ 11s] checking whether stripping libraries is possible... yes
[ 11s] checking if libtool supports shared libraries... yes
[ 11s] checking whether to build shared libraries... yes
[ 11s] checking whether to build static libraries... yes
[ 11s] configure: creating libtool
[ 11s] appending configuration tag "CXX" to libtool
[ 11s] checking for ld used by g++... /usr/x86_64-suse-linux/bin/ld -m elf_x86_64
[ 11s] checking if the linker (/usr/x86_64-suse-linux/bin/ld -m elf_x86_64) is GNU ld... yes
[ 11s] checking whether the g++ linker (/usr/x86_64-suse-linux/bin/ld -m elf_x86_64) supports shared libraries... yes
[ 12s] checking for g++ option to produce PIC... -fPIC
[ 12s] checking if g++ PIC flag -fPIC works... yes
[ 12s] checking if g++ static flag -static works... no
[ 12s] checking if g++ supports -c -o file.o... yes
[ 12s] checking whether the g++ linker (/usr/x86_64-suse-linux/bin/ld -m elf_x86_64) supports shared libraries... yes
[ 12s] checking dynamic linker characteristics... GNU/Linux ld.so
[ 12s] checking how to hardcode library paths into programs... immediate
[ 12s] appending configuration tag "F77" to libtool
[ 12s] checking for stdint.h... (cached) yes
[ 12s] configure: creating ./config.status
[ 13s] config.status: creating Makefile
[ 13s] config.status: creating libcpuid.pc
[ 13s] config.status: creating libcpuid/Makefile
[ 13s] config.status: creating cpuid_tool/Makefile
[ 13s] config.status: creating tests/Makefile
[ 13s] config.status: creating config.h
[ 13s] config.status: executing depfiles commands
[ 13s] + make V=1 -j2
[ 13s] make all-recursive
[ 13s] make[1]: Entering directory `/home/abuild/rpmbuild/BUILD/libcpuid-0.1.0'
[ 13s] Making all in libcpuid
[ 13s] make[2]: Entering directory `/home/abuild/rpmbuild/BUILD/libcpuid-0.1.0/libcpuid'
[ 13s] /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -Wall -Wmissing-declarations -Wmissing-prototypes -fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -c -o cpuid_main.lo cpuid_main.c
[ 13s] /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -Wall -Wmissing-declarations -Wmissing-prototypes -fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -c -o recog_intel.lo recog_intel.c
[ 13s] mkdir .libs
[ 13s] gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -Wall -Wmissing-declarations -Wmissing-prototypes -fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -c recog_intel.c -fPIC -DPIC -o .libs/recog_intel.o
[ 13s] gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -Wall -Wmissing-declarations -Wmissing-prototypes -fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -c cpuid_main.c -fPIC -DPIC -o .libs/cpuid_main.o
[ 13s] gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -Wall -Wmissing-declarations -Wmissing-prototypes -fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -c recog_intel.c -o recog_intel.o >/dev/null 2>&1
[ 13s] /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -Wall -Wmissing-declarations -Wmissing-prototypes -fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -c -o recog_amd.lo recog_amd.c
[ 14s] In file included from /usr/include/stdlib.h:314:0,
[ 14s] from cpuid_main.c:36:
[ 14s] /usr/include/sys/types.h:197:13: error: conflicting types for 'int64_t'
[ 14s] __intN_t (64, __DI__);
[ 14s] ^
[ 14s] In file included from libcpuid.h:56:0,
[ 14s] from cpuid_main.c:26:
[ 14s] libcpuid_types.h:51:26: note: previous declaration of 'int64_t' was here
[ 14s] typedef signed long long int64_t;
[ 14s] ^
[ 14s] make[2]: *** [cpuid_main.lo] Error 1
[ 14s] make[2]: *** Waiting for unfinished jobs....
[ 14s] gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -Wall -Wmissing-declarations -Wmissing-prototypes -fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -c recog_amd.c -fPIC -DPIC -o .libs/recog_amd.o
[ 14s] gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -Wall -Wmissing-declarations -Wmissing-prototypes -fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -c recog_amd.c -o recog_amd.o >/dev/null 2>&1
[ 14s] make[2]: Leaving directory `/home/abuild/rpmbuild/BUILD/libcpuid-0.1.0/libcpuid'
[ 14s] make[1]: *** [all-recursive] Error 1
[ 14s] make[1]: Leaving directory `/home/abuild/rpmbuild/BUILD/libcpuid-0.1.0'
[ 14s] make: *** [all] Error 2

Any help please?

Could you also add openSUSE how-to-install instructions ( http://software.opensuse.org/download.html?project=Education&package=i-nex ) to your website please?

Question information

Language:
English Edit question
Status:
Solved
For:
I-Nex Edit question
Assignee:
No assignee Edit question
Solved by:
DAP
Solved:
Last query:
Last reply:
Revision history for this message
eloaders (eloaders) said :
#1

I do not understand the error unfortunately. It would report to the original creator of the library, or give advice to someone who knows C.

On Ubuntu and derivatives that do not have this problem.

My code libcpuid with added support for x2apic: https://github.com/eloaders/libcpuid
The original code: http://libcpuid.sourceforge.net/download.html

Revision history for this message
DAP (darkness) said :
#2

Your fork provides a fix, thanks. Is /usr/bin/cpuid_tool required in runtime or is it a development tool?
What about how-to-install link? ;)

Revision history for this message
eloaders (eloaders) said :
#3

/usr/bin/cpuid_tool is not required by i-nex.

I-Nex not require libcpuid. Please compile -static

Look in makefile:

CFLAGS = -g -Wall
LSB_CS = $(shell lsb_release -cs)
CC_OPTS_LIBCPUID = $(shell pkg-config libcpuid --cflags --libs)
libgl = $(shell pkg-config gl --cflags --libs)
libx11 = $(shell pkg-config x11 --cflags --libs)
libxext = $(shell pkg-config xext --cflags --libs)
GBC = /usr/bin/gbc3
GBCOPTS = -eagtpm
GBA = gba3
CC = gcc
ifeq ($(ARCH),x86)
additional_confflags := --disable-sse2
endif
ifeq ($(ARCH),x86_64)
additional_confflags := -O2
endif
ifeq ($(LSB_CS),precise)
CC_OPTS_LIBPROCPS = -lproc
else
CC_OPTS_LIBPROCPS = $(shell pkg-config libprocps --cflags --libs)
endif

make:
 @printf "\033[1;31mCompile edid-decode as inex-decode \033[0m$1\n"
 $(CC) -o i-nex-edid JSON/i-nex-edid.c $(CFLAGS) $(additional_confflags)
 $(CC) -o i-nex-cpuid JSON/i-nex-cpuid.c -static $(CC_OPTS_LIBCPUID) $(additional_confflags)
 $(CC) -o i-nex-usage JSON/i-nex-usage.c -static $(CC_OPTS_LIBPROCPS) $(additional_confflags)
 $(CC) -o i-nex-cpusage JSON/i-nex-cpusage.c $(additional_confflags)
 $(CC) -o i-nex-glinfo JSON/i-nex-glinfo.c $(libx11) $(libgl) $(libxext) $(additional_confflags)
 $(CC) -o i-nex-uname JSON/i-nex-uname.c $(additional_confflags)
 @printf "\033[1;31mCompile src/i-nex stage 1 \033[0m$1\n"
 $(GBC) $(GBCOPTS) src/i-nex
 @printf "\033[1;31mCompile src/i-nex stage 2 \033[0m$1\n"
 $(GBA) src/i-nex
 $(MAKE) -C pixmaps

Revision history for this message
DAP (darkness) said :
#4

Static compiling is a very ugly decision for repos.