How can I compile quantization_example.cc on ARM(Raspberry with debain linux branch)?

105 views
Skip to first unread message

hugh

unread,
Sep 12, 2018, 4:07:36 AM9/12/18
to gemmlowp
Hi, 

    I want compile quantization_example.cc on Raspberry (debain for Raspberry, and the g++ version is 6.0), but it can complete.

    compile command as follow:

     $ g++ doc/quantization_example.cc -I . --std=c++11 -march=native -lpthread -o /tmp/quantization_example

    when  ld stage, it has errors, Can you give me some advice?

     how can I compile quantization_example.cc  on ARM(with linux system, not on Android platform)?
      

Benoit Jacob

unread,
Sep 12, 2018, 9:30:43 AM9/12/18
to dear...@gmail.com, gemmlowp
Hello,

This program is generic C++, it should compile on any GCC, Clang or even other compilers, on ARM or other architectures regardless of Android.

To make an ARM binary, just make sure that the toolchain you're invoking (in your cmdline, "g++") is an ARM cross-compiler, presumably the one provided by RPi; that should be explained in RPi docs.

Maybe if you paste your linking errors we can help.

Benoit


--
You received this message because you are subscribed to the Google Groups "gemmlowp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gemmlowp+u...@googlegroups.com.
To post to this group, send email to gemm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gemmlowp/ddf90703-bfa7-45ed-90ba-eb230789c9b2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

hugh

unread,
Sep 13, 2018, 11:55:30 PM9/13/18
to gemmlowp
Hi,

     I use g++ on RPi, the error as follows:

微信截图_20180914115450.png



在 2018年9月12日星期三 UTC+8下午4:07:36,hugh写道:

Benoit Jacob

unread,
Sep 14, 2018, 3:18:56 AM9/14/18
to 李晋, gemmlowp
One problem seems to be the first slash (/) in this flag: 

This screenshot shows that your cmdline has

-o /doc/quantization_example

try replacing this with

-o /tmp/quantization_example

as in your email, or with

-o doc/quantization_example

ie without the first slash (/). The problem is that passing "/doc" tells the compiler to write to a "/doc" top-level directory in your filesystem, which presumably does not exist.


--
You received this message because you are subscribed to the Google Groups "gemmlowp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gemmlowp+u...@googlegroups.com.
To post to this group, send email to gemm...@googlegroups.com.

hugh

unread,
Sep 19, 2018, 8:34:16 AM9/19/18
to gemmlowp
Hi, 
   
    I am sorry, it's my mistake.




在 2018年9月12日星期三 UTC+8下午4:07:36,hugh写道:
Hi, 
Reply all
Reply to author
Forward
0 new messages