brailsmt / hadoop-snappy

Automatically exported from code.google.com/p/hadoop-snappy
Apache License 2.0
0 stars 0 forks source link

SnappyCompressor.c:64: error #5

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. svn checkout 
2. Install all pre-requisites
3. Run 'mvn package -Dsnappy.prefix=/home/ngc/Char/snap/snappy_build' 
(snappy_build is my Snappy installation folder, which contains the following 
folders: include; lib; share).

What version of the product are you using? On what operating system?
- Maven 3.03 on Ubuntu 10.04

--

$ mvn package -Dsnappy.prefix=/home/ngc/Char/snap/snappy_build
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Hadoop Snappy 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ 
hadoop-snappy ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 
/home/ngc/Char/snap/hadoop-snappy/hadoop-snappy-read-only/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ 
hadoop-snappy ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-antrun-plugin:1.6:run (compile) @ hadoop-snappy ---
[INFO] Executing tasks

main:

checkpreconditions:

compilenative:
     [exec] libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `config'.
     [exec] libtoolize: copying file `config/config.guess'
     [exec] libtoolize: copying file `config/config.sub'
     [exec] libtoolize: copying file `config/install-sh'
     [exec] libtoolize: copying file `config/ltmain.sh'
     [exec] libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
     [exec] libtoolize: copying file `m4/libtool.m4'
     [exec] libtoolize: copying file `m4/ltoptions.m4'
     [exec] libtoolize: copying file `m4/ltsugar.m4'
     [exec] libtoolize: copying file `m4/ltversion.m4'
     [exec] libtoolize: copying file `m4/lt~obsolete.m4'
     [exec] checking for gcc... gcc
     [exec] checking whether the C compiler works... yes

...
...

[exec] configure: creating ./config.status
     [exec] config.status: creating Makefile
     [exec] config.status: creating config.h
     [exec] config.status: config.h is unchanged
     [exec] config.status: executing depfiles commands
     [exec] config.status: executing libtool commands
     [exec] depbase=`echo src/org/apache/hadoop/io/compress/snappy/SnappyCompressor.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
     [exec]     /bin/bash ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.  -I/home/ngc/jdk1.6.0_25/include -I/home/ngc/jdk1.6.0_25/include/linux src/org/apache/hadoop/io/compress/snappy/SnappyCompressor.c: In function \u2018Java_org_apache_hadoop_io_compress_snappy_SnappyComp-I/home/ngc/Char/snap/hadoop-snappy/hadoop-snappy-read-only/src/main/native/src -Isrc/org/apache/hadoop/io/compress/snappy -I/horessor_initIDs\u2019:
     [exec] src/org/apache/hadoop/io/compress/snappy/SnappyCompressor.c:64: error: \u2018libnotfound\u2019 undeclared (first use in this function)
     [exec] src/org/apache/hadoop/io/compress/snappy/SnappyCompressor.c:64: error: (Each undeclared identifier is reported only once
     [exec] src/org/apache/hadoop/io/compress/snappy/SnappyCompressor.c:64: error: for each function it appears in.)
     [exec] src/org/apache/hadoop/io/compress/snappy/SnappyCompressor.c:64: error: expected \u2018)\u2019 before \u2018libnotfound\u2019
     [exec] src/org/apache/hadoop/io/compress/snappy/SnappyCompressor.c:64: warning: too few arguments for format
     [exec] src/org/apache/hadoop/io/compress/snappy/SnappyCompressor.c:64: warning: too few arguments for format
     [exec] src/org/apache/hadoop/io/compress/snappy/SnappyCompressor.c: In function \u2018Java_org_apache_hadoop_io_compress_snappy_SnappyCompressor_compressBytesDirect\u2019:
     [exec] src/org/apache/hadoop/io/compress/snappy/SnappyCompressor.c:117: warning: passing argument 4 of \u2018dlsym_snappy_compress\u2019 from incompatible pointer type
     [exec] src/org/apache/hadoop/io/compress/snappy/SnappyCompressor.c:117: note: expected \u2018size_t *\u2019 but argument is of type \u2018jint *\u2019
     [exec] make: *** [src/org/apache/hadoop/io/compress/snappy/SnappyCompressor.lo] Error 1
     [exec] me/ngc/Char/snap/snappy_build/include -g -Wall -fPIC -O2 -m64 -g -O2 -MT src/org/apache/hadoop/io/compress/snappy/SnappyCompressor.lo -MD -MP -MF $depbase.Tpo -c -o src/org/apache/hadoop/io/compress/snappy/SnappyCompressor.lo src/org/apache/hadoop/io/compress/snappy/SnappyCompressor.c &&\
     [exec]     mv -f $depbase.Tpo $depbase.Plo
     [exec] libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/home/ngc/jdk1.6.0_25/include -I/home/ngc/jdk1.6.0_25/include/linux -I/home/ngc/Char/snap/hadoop-snappy/hadoop-snappy-read-only/src/main/native/src -Isrc/org/apache/hadoop/io/compress/snappy -I/home/ngc/Char/snap/snappy_build/include -g -Wall -fPIC -O2 -m64 -g -O2 -MT src/org/apache/hadoop/io/compress/snappy/SnappyCompressor.lo -MD -MP -MF src/org/apache/hadoop/io/compress/snappy/.deps/SnappyCompressor.Tpo -c src/org/apache/hadoop/io/compress/snappy/SnappyCompressor.c  -fPIC -DPIC -o src/org/apache/hadoop/io/compress/snappy/.libs/SnappyCompressor.o
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.666s
[INFO] Finished at: Tue Aug 09 12:39:44 EDT 2011
[INFO] Final Memory: 6M/361M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-antrun-plugin:1.6:run (compile) on project 
hadoop-snappy: An Ant BuildException has occured: The following error occurred 
while executing this line:
[ERROR] 
/home/ngc/Char/snap/hadoop-snappy/hadoop-snappy-read-only/maven/build-compilenat
ive.xml:75: exec returned: 2
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please 
read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

--

It looks like the error comes from Line 64 of SnappyCompressor.c. I've tried to 
debug it, but I couldn't really determine why the code wasn't working.

Does anybody have any idea on why the error is generated?

- CK

Original issue reported on code.google.com by chul...@gmail.com on 9 Aug 2011 at 4:52

GoogleCodeExporter commented 9 years ago
fyi, "\u2019" is an apostrophe ('). Copy-and-paste was done improperly.

Original comment by chul...@gmail.com on 9 Aug 2011 at 4:54

GoogleCodeExporter commented 9 years ago
I experiance something similar (which also had to do with the resulting value 
of HADOOP_SNAPPY_LIBRARY determined in the "configure" script - that is, a 
custom configure function defined in acinclude.m4). If the available ways of 
resolving the value of the (snappy) library file doesnt work out, the configure 
phase dont fail directly. Instead some humbug value of the 
HADOOP_SNAPPY_LIBRARY is assigned and the compilation fails instead. Im a total 
gcc noob, so bear with my layman explaination. 

Original comment by Kalle.Wi...@gmail.com on 13 Feb 2012 at 9:18

GoogleCodeExporter commented 9 years ago
...like for me, i clearly have the libsnappy files in /usr/local/lib, but the 
objdump  and ldd tools doesnt list it as a dependency after compiling/linking 
conftest.c with "snappy" as a dependency. Id expect you can hardcode 
"libsnapp.so" as the result of that custom function.

Original comment by Kalle.Wi...@gmail.com on 13 Feb 2012 at 9:27