Compiling Pioneer for Raspberry Pi (ARM)

eloquentmess
Posts: 40
Joined: Fri Jul 04, 2014 8:23 pm

Compiling Pioneer for Raspberry Pi (ARM)

Post 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
robn
Posts: 302
Joined: Mon Jul 01, 2013 1:11 am
Location: Melbourne, Australia

Re: Compiling Pioneer for Raspberry Pi (ARM)

Post 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.
eloquentmess
Posts: 40
Joined: Fri Jul 04, 2014 8:23 pm

Re: Compiling Pioneer for Raspberry Pi (ARM)

Post by eloquentmess »

Okay, thanks!
FluffyFreak
Posts: 1342
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Compiling Pioneer for Raspberry Pi (ARM)

Post by FluffyFreak »

Ah, hello.

Yes just disable the Profiler completely. It wasn't designed for anything other than Intel / x86 CPUs
robn
Posts: 302
Joined: Mon Jul 01, 2013 1:11 am
Location: Melbourne, Australia

Re: Compiling Pioneer for Raspberry Pi (ARM)

Post 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.
eloquentmess
Posts: 40
Joined: Fri Jul 04, 2014 8:23 pm

Re: Compiling Pioneer for Raspberry Pi (ARM)

Post 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?
FluffyFreak
Posts: 1342
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Compiling Pioneer for Raspberry Pi (ARM)

Post 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
eloquentmess
Posts: 40
Joined: Fri Jul 04, 2014 8:23 pm

Re: Compiling Pioneer for Raspberry Pi (ARM)

Post by eloquentmess »

I'll give it a shot, and I'll let you know what happens!
Xeno
Posts: 16
Joined: Thu Jul 17, 2014 8:25 am

Re: Compiling Pioneer for Raspberry Pi (ARM)

Post 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.
eloquentmess
Posts: 40
Joined: Fri Jul 04, 2014 8:23 pm

Re: Compiling Pioneer for Raspberry Pi (ARM)

Post 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.
Post Reply