dmsovetov / nvidia-texture-tools

Automatically exported from code.google.com/p/nvidia-texture-tools
Other
0 stars 0 forks source link

Out of the box build does not work on linux x86_64 #10

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Building using "cmake . && make" on Fedora 7 x86_64

What is the expected output? What do you see instead?

It should build normally, but instead:

[per@localhost nvidia-texture-tools]$ make
Scanning dependencies of target nvcore
[  2%] Building CXX object src/nvcore/CMakeFiles/nvcore.dir/Memory.o
/home/per/devinstall/nvidia-texture-tools/src/nvcore/Memory.cpp:1: error:
CPU you selected does not support x86-64 instruction set
/home/per/devinstall/nvidia-texture-tools/src/nvcore/Memory.cpp:1: error:
CPU you selected does not support x86-64 instruction set
make[2]: *** [src/nvcore/CMakeFiles/nvcore.dir/Memory.o] Error 1
make[1]: *** [src/nvcore/CMakeFiles/nvcore.dir/all] Error 2
make: *** [all] Error 2

What version of the product are you using? On what operating system?

Both version 0.9.4 and svn trunk revision 76 fail as above.

Please provide any additional information below.

Patch that should fix the problem is attached. It detects g++ and sets the
use of SSE3 in a way that should not break with x86_64 processors.

Original issue reported on code.google.com by per.math...@gmail.com on 18 Aug 2007 at 10:25

Attachments:

GoogleCodeExporter commented 8 years ago
Whops! Thanks for catching that. I used to comment/uncomment that line locally
according to the system where I'm working from, and probably submitted it by 
error.
I've added the gnucxx compiler check and left all the custom options commented 
out.

I wish there were a cmake script that set the optimal options for the current 
system
automatically. I wonder how does gentoo do that... I guess you could do `uname 
-m` or
`cat /proc/cpuinfo`, and have a table with predefined options for each supported
machine type.

These seem to be the ones used in gentoo:
http://www.freehackers.org/gentoo/gccflags/flag_gcc3.html

Original comment by cast...@gmail.com on 20 Aug 2007 at 10:49

GoogleCodeExporter commented 8 years ago
Per, I've added some basic processor detection and automated optimal compiler 
option
selection. Please, let me know if that works for you.

Original comment by cast...@gmail.com on 21 Aug 2007 at 6:48

GoogleCodeExporter commented 8 years ago
Works fine here. Thanks! :-)

Original comment by per.math...@gmail.com on 22 Aug 2007 at 9:00