Am 04.03.21 um 18:36 schrieb Harry van der Wolf:

Compiling pv on my Ubuntu Mate raspberry pi 4.
A very short action:
  make
clang++ -c -Ofast -march=native -std=c++11 -c -fno-math-errno -Wno-unused-value pv_no_rendering.cc -o pv_no_rendering.o
clang: error: the clang compiler does not support '-march=native'
make: *** [makefile:103: pv_no_rendering.o] Error 1

Just a quick thank-you back before I log off for the day...

That's funny. -march=native means 'compile using all instructions your local processor supports' and is usually the fastest binary the compiler can provide for the local machine, and I've used the flag for ages without problems. Without that flag, the compiler usually picks a conservative fallback ISA which is assumed to work 'everywhere' (that would be all ARM chips in your case) and is usually slow - e.g. on intel machines that's SSE, which pretty much every intel processor still alive can handle. So not getting the 'native' ISA may slow things down, especially when the vector units are not used, which make pv fast.

Of course the CPU and ISA is not the only factor for speed - pv also uses a lot of memory bandwidth.

There is another alternative - to use g++ instead of clang++. On intel machines, I get slower binaries with g++, but that does not mean it's the same on ARM. -march=native is really a g++ option, and clang++ is usually 100% compatible...

And did you check the compiler's version as well?

So it works fine on Debian Buster on my server RPi4, but not on my RPi4 with Ubuntu Mate 20.04 (Ubuntu 20.04.2 LTS; uname -a: Linux ubuntu 5.4.0-1028-raspi #31-Ubuntu SMP PREEMPT Wed Jan 20 11:30:45 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux)

So I removed the -march=native from the common_compiler_flags in the makefile and started make again.

Now it builds 3 versions which I quickly checked on a partial pano on a 1920x1080 monitor.
See attached txt files.

That's the proof I was hoping for. It's not fast (didn't expect that from the little machine) but it *works* :D

and that suggests that all we'd need for an M1 build is someone with a new mac - would be best to compile on that machine, but one might cross-compile and only test the binary on the M1.

Anybody out there?

Concerning packaging I'll take a while longer to respond.

Kay

--
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
--- You received this message because you are subscribed to the Google Groups "hugin and other free panoramic software" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/hugin-ptx/5bc0c514-416b-0ed3-1a7a-3ec0601b9ec1%40yahoo.com.

Reply via email to