pradeep250677 / lz4

Automatically exported from code.google.com/p/lz4
0 stars 0 forks source link

compile fails on Funtoo #84

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.  Using the Funtoo package manager "emerge lz4"
2.  Towards the end it fails with several "Assembler messages:
Error: unknown architecture `native'" (similar to issue 79, #2)
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
revision 102
Funtoo CHOST="armv5tel-softfloat-linux-gnueabi"
Please provide any additional information below.
My default cflags for the compiler:
CFLAGS="-O2 -pipe -march=armv5te -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
I have attached a copy of the emerge log.

Original issue reported on code.google.com by yuyu...@gmail.com on 4 Sep 2013 at 6:26

Attachments:

GoogleCodeExporter commented 8 years ago
OK, this one is going to be difficult to debug.
Error message is very generic, and doesn't point to any precise place in the 
code.

'native' is not a keyword, neither in the source file, nor the makefile.
So my understanding is that this issue is completely different from issue 79.

My current guess is that maybe some intrinsic are not supported on your target 
platform, and no software backup is provided by the compiler.
For example, maybe the bit count intrinsic is unsupported. In this case, you 
can use the software version embedded into LZ4, by defining 
LZ4_FORCE_SW_BITCOUNT.

PS : Note that the attached log file is empty.

Original comment by yann.col...@gmail.com on 4 Sep 2013 at 8:25

GoogleCodeExporter commented 8 years ago
I apologize for the empty log, let's try again.
Perhaps I have jumped to conclusions here, seeing issue 79, and using that as a 
basis for deciding that it wasn't so much a distro problem as an upstream 
problem.  Yes, the 1st thing I did was grep for keyword native, the only 
instances of that word in the entire svn directory are NATIVE (all caps, 
unrelated).  I will dig into this a little deeper in the next day or two and 
let you know what I come up with, of course I'll try that LZ4_FORCE_SW_BITCOUNT 
definition 1st, easy is good.
FWIW it is masked in Funtoo as an experimental package, requiring explicit 
unmasking to use.  I opened a bit of a can of worms here, just thought I'd try 
that speedy kernel decompression in 3.11, that's currently the extent of my 
usage of it.  I _think going from gzip to lzo might have given me a 5 second 
faster boot (maybe), so how much can it really matter?  Anyhow, interest is 
peaked now, gonna work with it.

Original comment by yuyu...@gmail.com on 4 Sep 2013 at 9:51

Attachments:

GoogleCodeExporter commented 8 years ago
You seem to have a makefile issue.
The problem comes from the instruction : -march=native
This gcc instruction is sometimes unsupported.

-march=native is no longer present into lz4 makefile for a while now, so I 
guess you're using a different makefile.

Anyway, the solution looks simple : remove -march=native argument

Original comment by yann.col...@gmail.com on 4 Sep 2013 at 10:12

GoogleCodeExporter commented 8 years ago
Success!
Here is where they were:

/svn-src/lz4-read-only/trunk/cmake/pack/CMakeLists.txt:ADD_DEFINITIONS("-O3 
-march=native -std=c99")
/svn-src/lz4-read-only/trunk/cmake/CMakeLists.txt:ADD_DEFINITIONS("-Os 
-march=native -std=c99")
/svn-src/lz4-read-only/trunk/.svn/pristine/61/61a87508ec3f5d0f0746c7ffd5c615cc1e
5fd2f2.svn-base:ADD_DEFINITIONS("-Os -march=native -std=c99")
/svn-src/lz4-read-only/trunk/.svn/pristine/15/153631a1c9ad67c1a9c0eb857d11862feb
25e69e.svn-base:ADD_DEFINITIONS("-O3 -march=native -std=c99")

Changed them directly (a no-no) to -march=armv5te and it just compiled fine.
Some leftovers that got missed perhaps?  Or is this Funtoo's responsibility, if 
so let me know and I'll notify them.
I hope I have helped rather than being a nuisance, all fine here now, thanks 
for the help.

Original comment by yuyu...@gmail.com on 5 Sep 2013 at 12:14

GoogleCodeExporter commented 8 years ago
LZ4's Makefile does not use -march=native argument, so the issue comes from 
another source.

Original comment by yann.col...@gmail.com on 5 Sep 2013 at 7:05