Page 1 of 6
Compiling Pioneer for Raspberry Pi (ARM)
Posted: Mon Jul 07, 2014 2:18 am
by eloquentmess
I'm attempting to compile Pioneer for ARM (on my Raspberry Pi). Unfortunately, it's hanging up during the compilation, and I don't know what to do to fix it. Here's the error, any ideas?
Code: Select all
make[2]: Entering directory `/home/pi/software/pioneer/src'
CXX Pi.o
In file included from libs.h:67:0,
from utils.h:11,
from Pi.h:7,
from Pi.cpp:4:
../contrib/profiler/Profiler.h: In static member function ‘static void Pi::Init(const std::map<std::basic_string<char>, std::basic_string<char> >&, bool)’:
../contrib/profiler/Profiler.h:156:50: error: impossible constraint in ‘asm’
../contrib/profiler/Profiler.h:156:50: error: impossible constraint in ‘asm’
make[2]: *** [Pi.o] Error 1
make[2]: Leaving directory `/home/pi/software/pioneer/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/pi/software/pioneer/src'
make: *** [all-recursive] Error 1
Re: Compiling Pioneer for Raspberry Pi (ARM)
Posted: Mon Jul 07, 2014 4:50 am
by robn
Its trying to compile portions of the profiler that emit Intel assembly, which naturally can't work.
The proper fix is to just set up stubs when PIONEER_PROFILER / __PROFILER_ENABLED__ isn't defined. Ping @Fluffyfreak on that one.
Re: Compiling Pioneer for Raspberry Pi (ARM)
Posted: Mon Jul 07, 2014 6:19 am
by eloquentmess
Okay, thanks!
Re: Compiling Pioneer for Raspberry Pi (ARM)
Posted: Sun Jul 13, 2014 8:06 pm
by FluffyFreak
Ah, hello.
Yes just disable the Profiler completely. It wasn't designed for anything other than Intel / x86 CPUs
Re: Compiling Pioneer for Raspberry Pi (ARM)
Posted: Mon Jul 14, 2014 5:04 am
by robn
That's not the whole problem. The headers don't appear to enough #ifdef to stop the compiler from trying to parse them, and there it fails.
Re: Compiling Pioneer for Raspberry Pi (ARM)
Posted: Thu Jul 17, 2014 4:23 am
by eloquentmess
I don't know how to disable the profiler or mess with headers. Any ideas how I can get these fixes implemented? Or a shove in the right direction?
Re: Compiling Pioneer for Raspberry Pi (ARM)
Posted: Thu Jul 17, 2014 9:51 am
by FluffyFreak
It's the rdtsc stuff in "
contrib/profiler/Profiler.h" that's causing the problem isn't it.
Ok you basically want to comment out or replace with dummy functions the functions from lines 144 to 163.
Code: Select all
static inline u64 getticks_serial() {
#if defined(__GNUC__)
asm volatile("cpuid" : : : "%eax", "%ebx", "%ecx", "%edx" );
#else
__asm cpuid;
#endif
return getticks();
}
#if defined(__GNUC__)
static inline u64 getticks() {
u32 __a,__d;
asm volatile("rdtsc" : "=a" (__a), "=d" (__d));
return ( u64(__a) | u64(__d) << 32 );
}
#elif defined(__ICC) || defined(__ICL)
static inline u64 getticks() { return _rdtsc(); }
#else
static inline u64 getticks() { __asm { rdtsc }; }
#endif
Could become something like:
Code: Select all
static inline u64 getticks_serial() {
return getticks();
}
static inline u64 getticks() { return 0; }
And that should compile. I don't think it will break anything other than the profiler code but since that's disabled anyway it should be ok.
Andy
Re: Compiling Pioneer for Raspberry Pi (ARM)
Posted: Mon Jul 21, 2014 11:57 pm
by eloquentmess
I'll give it a shot, and I'll let you know what happens!
Re: Compiling Pioneer for Raspberry Pi (ARM)
Posted: Wed Jul 23, 2014 2:12 am
by Xeno
eloquentmess wrote:I'll give it a shot, and I'll let you know what happens!
A friend and I both have several Pi's between us and are constantly looking for new, neat things to do with them. A pioneer kiosk would be a lark! Be sure to keep us posted.
Re: Compiling Pioneer for Raspberry Pi (ARM)
Posted: Wed Jul 23, 2014 10:58 pm
by eloquentmess
Well, as of the last git update, the source wouldn't finish compiling. I'll post an error once I can get it. I've been busy with class.