PDA

View Full Version : Raspberry Pi Compilation



Ziagl
02-05-2014, 11:24 AM
Hi,

I'm working on a new article for my blog (Developer-blog.net (http://developer-blog.net)) and trying to compile ClanLib on my Raspberry Pi.
I got stuck with the following error:
Math/mat4.cpp:39:45: fatal error: emmintrin.h: Datei oder Verzeichnis nicht gefunden
compilation terminated.
make[2]: *** [Math/libclan30Core_la-mat4.lo] Fehler 1
make[2]: Leaving directory `/home/pi/ClanLib-3.0.1/Sources/Core'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/home/pi/ClanLib-3.0.1/Sources'
make: *** [all-recursive] Fehler 1

Have anyone ever seen this issue? Is this a problem with Raspberry Pi ARM chip?

Hope someone have ideas.

Renann Prado
02-06-2014, 12:08 AM
Post the error in English, it'll be easy to help!

Ziagl
02-06-2014, 06:48 AM
Math/mat4.cpp:39:45: fatal error: emmintrin.h: File or directory not found
compilation terminated.
make[2]: *** [Math/libclan30Core_la-mat4.lo] Error 1
make[2]: Leaving directory `/home/pi/ClanLib-3.0.1/Sources/Core'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/pi/ClanLib-3.0.1/Sources'
make: *** [all-recursive] Error 1

rombust
02-06-2014, 07:26 AM
You need to define DISABLE_SSE2, to disable x86 intrinsics

Best of luck, nobody has ever attempted to compile ClanLib on a Raspberry Pi before.

Ziagl
02-06-2014, 07:52 AM
Thank you,
I will try it and will give feedback. Would be nice to run ClanLib on my Pi :)

Ziagl
02-06-2014, 09:23 AM
hm. I did the following:

./configure --disable-sse2 --prefix=/usr
make

but ended with the same error :(

rombust
02-06-2014, 08:55 PM
That's because all "CL_DISABLE_SSE2" in the source code has incorrectly been changed to DISABLE_SSE2 at some point

Either fix the source code or

Modify configure.ac, add
AC_DEFINE(DISABLE_SSE2)
under the 2 lines containing
AC_DEFINE(CL_DISABLE_SSE2)

And change
extra_CFLAGS_clanCore="$extra_CFLAGS_clanCore -DCL_DISABLE_SSE2"
to
extra_CFLAGS_clanCore="$extra_CFLAGS_clanCore -DCL_DISABLE_SSE2 -DDISABLE_SSE2"

Remember to re-run ./autogen.sh

Ziagl
02-07-2014, 12:31 PM
Ok I did that and now I get a completely different error. But again something wrong with x86 architecture...

System/detect_cpu_ext.cpp: In static member function 'static bool clan::System::detect_cpu_extension(clan::System::C PU_ExtensionX86)':
System/detect_cpu_ext.cpp:82:3: error: impossible constraint in 'asm'
System/detect_cpu_ext.cpp:87:3: error: impossible constraint in 'asm'
System/detect_cpu_ext.cpp:91:3: error: impossible constraint in 'asm'
System/detect_cpu_ext.cpp:96:3: error: impossible constraint in 'asm'
System/detect_cpu_ext.cpp:100:3: error: impossible constraint in 'asm'
System/detect_cpu_ext.cpp:105:3: error: impossible constraint in 'asm'
System/detect_cpu_ext.cpp:109:3: error: impossible constraint in 'asm'
System/detect_cpu_ext.cpp:114:3: error: impossible constraint in 'asm'
System/detect_cpu_ext.cpp:119:3: error: impossible constraint in 'asm'
System/detect_cpu_ext.cpp:124:3: error: impossible constraint in 'asm'
System/detect_cpu_ext.cpp:129:3: error: impossible constraint in 'asm'
System/detect_cpu_ext.cpp:135:3: error: impossible constraint in 'asm'
System/detect_cpu_ext.cpp:139:3: error: impossible constraint in 'asm'
System/detect_cpu_ext.cpp:144:3: error: impossible constraint in 'asm'
System/detect_cpu_ext.cpp:149:3: error: impossible constraint in 'asm'
System/detect_cpu_ext.cpp:154:3: error: impossible constraint in 'asm'
System/detect_cpu_ext.cpp:158:3: error: impossible constraint in 'asm'
System/detect_cpu_ext.cpp:163:3: error: impossible constraint in 'asm'
System/detect_cpu_ext.cpp:168:3: error: impossible constraint in 'asm'
System/detect_cpu_ext.cpp:173:3: error: impossible constraint in 'asm'
System/detect_cpu_ext.cpp:178:3: error: impossible constraint in 'asm'
System/detect_cpu_ext.cpp:182:3: error: impossible constraint in 'asm'
make[2]: *** [System/libclan30Core_la-detect_cpu_ext.lo] Error 1
make[2]: Leaving directory `/home/pi/ClanLib-3.0.1/Sources/Core'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/pi/ClanLib-3.0.1/Sources'
make: *** [all-recursive] Error 1

rombust
02-07-2014, 09:21 PM
You'll need to do a lot of work to get it to compile.

There isn't any #ifdef IS_NOT_X86_OR_APPLE defines.


System/detect_cpu_ext.cpp: In static member function 'static bool clan::System::detect_cpu_extension(clan::System::C PU_ExtensionX86)':

Raspberry PI uses an ARM processor, not X86, so that function should not exist on PI

Unless you are experienced at programming PI, I think porting ClanLib would be very tricky. (e.g. The OpenGL hooks, I/O Control, Event handling, Sound....)

Ziagl
02-11-2014, 10:09 AM
ok sounds difficult.

Would be a nice work, but currently I have not enough the time for that. :(