View previous topic :: View next topic | |||||||||||||||||
Author | Message | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
jordanwb l33t Joined: 10 Jul 2008 |
|
||||||||||||||||
Back to top |
|
||||||||||||||||
Hu Moderator Joined: 06 Mar 2007 |
|
||||||||||||||||
Back to top |
|
||||||||||||||||
jordanwb l33t Joined: 10 Jul 2008 |
|
||||||||||||||||
Back to top |
|
||||||||||||||||
DaggyStyle Watchman Joined: 22 Mar 2006 |
|
||||||||||||||||
Back to top |
|
||||||||||||||||
jordanwb l33t Joined: 10 Jul 2008 |
|
||||||||||||||||
Back to top |
|
||||||||||||||||
jordanwb l33t Joined: 10 Jul 2008 |
|
||||||||||||||||
Back to top |
|
||||||||||||||||
DaggyStyle Watchman Joined: 22 Mar 2006 |
|
||||||||||||||||
Back to top |
|
||||||||||||||||
jordanwb l33t Joined: 10 Jul 2008 |
|
||||||||||||||||
Back to top |
|
||||||||||||||||
Ant P. Watchman Joined: 18 Apr 2009 |
|
||||||||||||||||
Back to top |
|
||||||||||||||||
jordanwb l33t Joined: 10 Jul 2008 |
|
||||||||||||||||
Back to top |
|
||||||||||||||||
|
You cannot post new topics in this forum |
Support::Linux Servers Support forum for Linux EQEMu users.
«
All times are GMT -4. The time now is 04:45 AM.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Everquest is a registered trademark of Daybreak Game Company LLC. |
- Forum
- The Ubuntu Forum Community
- Ubuntu Specialised Support
- Gaming & Leisure
- glheretic — «cc1: error: CPU you selected does not support x86-64 instruction set»
-
glheretic — «cc1: error: CPU you selected does not support x86-64 instruction set»
I’m trying to install Heretic from source.
I downloaded the .tar.gz shareware wad from here; no problems.
I began following the instructions on this page, and when I tried entering
I got this output:
Code:
make glheretic - will build GLHeretic - needs OpenGL hardware accelleration make sndserver - will build the soundserver for Heretic make musserver - will build the musicserver (from lxdoom) for Heretic make clean - will clean up object and exec files
So then I tried entering , and the terminal gave me this:
Code:
gcc -pipe -E -M -Wall -DUNIX -DHAVE_USLEEP -DHAVE_MATH_H -DHAVE_VALUES_H -DLINUX_MOUSE -DUDP_PROTOCOL -DI_GGI_HERETIC -DNEED_SHMGETEVENTBASE -D__NEWVGALIB__ -O2 -fomit-frame-pointer -mcpu=i586 -march=i586 -D__32BIT__ -DHAVE_ALLOCA_H -DINLINE_FIXED -I. -I.. -I/usr/X11R6/include -D__DOSOUND__ -DSNDSERV -Isoundclient -D__DOMUSIC__ -DMUSSERV -Iopengl -DGL_HERETIC -I/usr/X11R6/include -DNICE_GL -L/usr/X11R6/lib *.c opengl/*.c soundclient/i_sound.c soundclient/soundst.c soundclient/sounds.c m_misc.c graphics/i_sdl_gl.c > .depend gcc: warning: �-mcpu=� is deprecated; use �-mtune=� or �-march=� instead cc1: error: CPU you selected does not support x86-64 instruction set #snip make: *** [depsdlogl] Error 1
(note: it actually output
Code:
cc1: error: CPU you selected does not support x86-64 instruction set
a little over 100 times, but I’ve cut out all but one to keep this post to a reasonable length. The shows where the rest were).
I did some Googling, and I think the problem might be to do with gcc, but I can’t find any way to update it.
Stuff that is probably relevant:
* I’m using Ubuntu 12.04
*gives
Code:
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
* gives
Code:
Linux <my PC's name> 3.2.0-27-generic #43-Ubuntu SMP Fri Jul 6 14:25:57 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
Anybody know what might be going on?
-
Re: glheretic — «cc1: error: CPU you selected does not support x86-64 instruction set
The package you are trying to build has been configured to target 32 bit systems. We know this because
Code:
-mcpu=i586 -march=i586 -D__32BIT__
are passed to gcc.
On a 64-bit system such as yours, the gcc and associated libraries are 64-bit and cannot generate code for 32 bit.
That’s what your error message means. Now what can you do about it? If you are only going to run it on your 64-bit system, then find out whether you can configure it for a 64-bit build. If you want to run it on 32-bit systems or if this software only works as 32-bit, then you will need to install extra gcc and library packages for building 32-bit on 64-bit systems. (I don’t recall the package names.)
Bookmarks
Bookmarks

Posting Permissions
I have the following CPU config;
lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 6
.
.
.
But when I try to make cnn
, i get an error message saying CPU you selected does not support x86-64 instruction set
.
Here is the complete error log:
make VERBOSE=1
/usr/local/bin/cmake -H/home/riyaz/GIT_Projects/cNN/cnn -B/home/riyaz/GIT_Projects/cNN/cnn/build —check-build-system CMakeFiles/Makefile.cmake 0
/usr/local/bin/cmake -E cmake_progress_start /home/riyaz/GIT_Projects/cNN/cnn/build/CMakeFiles /home/riyaz/GIT_Projects/cNN/cnn/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory /home/riyaz/GIT_Projects/cNN/cnn/build' make -f cnn/CMakeFiles/cnn.dir/build.make cnn/CMakeFiles/cnn.dir/depend make[2]: Entering directory
/home/riyaz/GIT_Projects/cNN/cnn/build’
cd /home/riyaz/GIT_Projects/cNN/cnn/build && /usr/local/bin/cmake -E cmake_depends «Unix Makefiles» /home/riyaz/GIT_Projects/cNN/cnn /home/riyaz/GIT_Projects/cNN/cnn/cnn /home/riyaz/GIT_Projects/cNN/cnn/build /home/riyaz/GIT_Projects/cNN/cnn/build/cnn /home/riyaz/GIT_Projects/cNN/cnn/build/cnn/CMakeFiles/cnn.dir/DependInfo.cmake —color=
make[2]: Leaving directory /home/riyaz/GIT_Projects/cNN/cnn/build' make -f cnn/CMakeFiles/cnn.dir/build.make cnn/CMakeFiles/cnn.dir/build make[2]: Entering directory
/home/riyaz/GIT_Projects/cNN/cnn/build’
/usr/local/bin/cmake -E cmake_progress_report /home/riyaz/GIT_Projects/cNN/cnn/build/CMakeFiles 1
[ 3%] Building CXX object cnn/CMakeFiles/cnn.dir/cfsm-builder.cc.o
cd /home/riyaz/GIT_Projects/cNN/cnn/build/cnn && /usr/bin/c++ -fPIC -funroll-loops -Wall -std=c++11 -Ofast -g -DEIGEN_FAST_MATH -march=native -I/home/riyaz/GIT_Projects/cNN/cnn -I/home/riyaz/GIT_Projects/cNN/cnn/external/easyloggingpp/src -I/usr/local/include -I/home/riyaz/GIT_Projects/cNN/cnn/../eigen -I/home/riyaz/GIT_Projects/cNN/cnn/build -o CMakeFiles/cnn.dir/cfsm-builder.cc.o -c /home/riyaz/GIT_Projects/cNN/cnn/cnn/cfsm-builder.cc
/home/riyaz/GIT_Projects/cNN/cnn/cnn/cfsm-builder.cc:1:0: error: CPU you selected does not support x86-64 instruction set
make[2]: *** [cnn/CMakeFiles/cnn.dir/cfsm-builder.cc.o] Error 1
make[2]: Leaving directory /home/riyaz/GIT_Projects/cNN/cnn/build' make[1]: *** [cnn/CMakeFiles/cnn.dir/all] Error 2 make[1]: Leaving directory
/home/riyaz/GIT_Projects/cNN/cnn/build’
make: *** [all] Error 2
Я хочу скомпилировать программу, в которой есть много 32-битных статических библиотек, которые я не могу перекомпилировать в 64-битные из-за отсутствия make-файлов, но есть некоторые библиотеки, которые я должен скомпилировать, чтобы получить некоторые статические библиотеки для использования вместе с ними.
Одна из библиотек, которую я хочу скомпилировать, имеет Makefile следующим образом:
CC = c++
BIN_DIR = ../lib
BIN = $(BIN_DIR)/libsql.a
CFLAGS = -w -O3 -ggdb3 -g3 -std=c++14 -pipe -mtune=i386 -fstack-protector -static
CPP=AsyncSQL.cpp Semaphore.cpp Statement.cpp Tellwait.cpp
all: $(BIN)
clean:
@echo Delete .obj files
@rm -f *.o
%.o: %.cpp
@echo -e "33[0;32m [OK] 33[0m" $<
@$(CXX) $(CFLAGS) -c $^ -o $@
$(BIN): $(CPP:%.cpp=%.o)
@ar cru $(BIN) $^
@ranlib $(BIN)
@rm -rf *.o
В результате получается следующий результат:
cc1plus: error: CPU you selected does not support x86-64 instruction set
Если я опущу параметр -mtune=i386
, он будет успешно скомпилирован, но тогда я должен скомпилировать остальные библиотеки как 64-битные двоичные файлы, и в конце я не смогу скомпилировать эти статические 32-битные.
Как я могу устранить эту ошибку?
Любое предложение будет оценено.
1 ответ
Лучший ответ
Чтобы скомпилировать 32-битный код в 64-битной системе, используйте параметр -m32
для gcc. -mtune=i386
неверно.
2
Nate Eldredge
25 Май 2020 в 22:12
I’m trying to use
pip install mysql-python
inside a virtualenv container and am getting the error
building '_mysql' extension
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Dversion_info=(1,2,4,'final',1) -D__version__=1.2.4 -I/usr/include/mysql -I/usr/include/python2.7 -c _mysql.c -o build/temp.linux-x86_64-2.7/_mysql.o -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv -fPIC -fPIC -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -DMY_PTHREAD_FASTMUTEX=1
_mysql.c:1:0: error: CPU you selected does not support x86-64 instruction set
error: command 'gcc' failed with exit status 1
Why is gcc trying to use -march=i686
when I’m on a 64-bit system and using a 64-bit version of Python?
asked Jul 7, 2013 at 12:59
0
You can set your architecture manually by setting the CFLAGS
environmental variable.
CFLAGS='-march=x86-64' pip install mysql-python
This variable’s contents are appended to gcc
‘s argument list.
answered Jul 8, 2013 at 0:19
2
Я пытаюсь следовать учебник в этой ссылка.
когда я подошел к той части, где я начинаю делать тест.файл c, я пытаюсь запустить первую строку компиляции.
gcc -c -g -Os -march=i686 -ffreestanding -Wall -Werror test.c -o test.o
вот содержание test.c
__asm__(".code16n");
__asm__("jmpl x0000, $mainn");
void main() {
}
когда я вызываю первую строку компиляции, она показывает мне эту ошибку.
test.c:1:0: error: CPU you selected does not support x86-64 instruction set
__asm__(".code16n");
^
может кто-нибудь сказать мне, почему это происходит? И если возможно, как это исправить?
Я запускаю Ubuntu Desktop x64, заранее спасибо за вашу помощь.
EDIT:
Я изменил первую строку компиляции:
gcc -c -g -Os -m32 -ffreestanding -Wall -Werror test.c -o test.o
и, кажется, работает нормально. Однако есть еще две строчки, которые меня беспокоят.
ld -static -Ttest.ld -nostdlib --nmagic -o test.elf test.o
и
objcopy -O binary test.elf test.bin
первый бросает мне ошибку.
ld: i386 architecture of input file `test.o' is incompatible with i386:x86-64 output
и из-за этого, я не пробовал последнюю строку компиляции.
вот код для тест.файл ЛД.
ENTRY(main);
SECTIONS
{
. = 0x7C00;
.text : AT(0x7C00)
{
*(.text);
}
.sig : AT(0x7DFE)
{
SHORT(0xaa55);
}
}
любые предложения о том, как это исправить?
3 ответов
источник -m32
вместо -march=i686
.
в самом деле добавить -m32
вы можете сохранить-март=i686 …
gcc -c -g -Os -march=i686 -m32 -ffreestanding -Wall -Werror test.c -o test.o
работает
gcc -c -g -Os -march=i686 -m16 -ffreestanding -Wall -Werror test.c -o test.o
работает
gcc -c -g -Os -march=i686 -m64 -ffreestanding -Wall -Werror test.c -o test.o
завершается с ;
gcc -std=c99 -c -g -Os -march=i686 -m32 -ffreestanding -Wall -Werror test.c -o test.o
ld -static -T test.ld -m elf_i386 -nostdlib --nmagic -o test.elf test.o