Build failing for native code

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Build failing for native code

Mahajan, Neeraj
Hi,
 
I am trying to build the native code (which includes the compression
library) on Solaris 10 (x86 64-bit). I get the following error while
building:
 
gmake  all-recursive
gmake[1]: Entering directory
`/home/nemahajan/hadoop-install/hadoop-0.13.0/src/native'
Making all in src/org/apache/hadoop/io/compress/zlib
gmake[2]: Entering directory
`/home/nemahajan/hadoop-install/hadoop-0.13.0/src/native/src/org/apache/
hadoop/io/compress/zlib'
if /bin/sh ../../../../../../../libtool --mode=compile gcc
-DHAVE_CONFIG_H -I. -I. -I../../../../../../..  -I/usr/java/include
-I/usr/java/include/solaris -I/src
-I/home/nemahajan/hadoop-install/lzo/lzo-2.02-bin/include -g -Wall -fPIC
-O2 -m -g -O2 -MT ZlibCompressor.lo -MD -MP -MF
".deps/ZlibCompressor.Tpo" -c -o ZlibCompressor.lo ZlibCompressor.c; \
then mv -f ".deps/ZlibCompressor.Tpo" ".deps/ZlibCompressor.Plo"; else
rm -f ".deps/ZlibCompressor.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../../../../../../.. -I/usr/java/include
-I/usr/java/include/solaris -I/src
-I/home/nemahajan/hadoop-install/lzo/lzo-2.02-bin/include -g -Wall -fPIC
-O2 -m -g -O2 -MT ZlibCompressor.lo -MD -MP -MF .deps/ZlibCompressor.Tpo
-c ZlibCompressor.c  -fPIC -DPIC -o .libs/ZlibCompressor.o
cc1: error: missing argument to "-m"
gmake[2]: *** [ZlibCompressor.lo] Error 1
gmake[2]: Leaving directory
`/home/nemahajan/hadoop-install/hadoop-0.13.0/src/native/src/org/apache/
hadoop/io/compress/zlib'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory
`/home/nemahajan/hadoop-install/hadoop-0.13.0/src/native'

 
Any idea how this can be resolved?
 
Thanks,
Neeraj
Reply | Threaded
Open this post in threaded view
|

Re: Build failing for native code

alakshman
By looking at the gcc command that you have a -m in it. It needs to be
either -m32 or -m64 depending on whether your machine is a 32 or 64 bit
machine.

A

On 6/18/07, Mahajan, Neeraj <[hidden email]> wrote:

>
> Hi,
>
> I am trying to build the native code (which includes the compression
> library) on Solaris 10 (x86 64-bit). I get the following error while
> building:
>
> gmake  all-recursive
> gmake[1]: Entering directory
> `/home/nemahajan/hadoop-install/hadoop-0.13.0/src/native'
> Making all in src/org/apache/hadoop/io/compress/zlib
> gmake[2]: Entering directory
> `/home/nemahajan/hadoop-install/hadoop-0.13.0/src/native/src/org/apache/
> hadoop/io/compress/zlib'
> if /bin/sh ../../../../../../../libtool --mode=compile gcc
> -DHAVE_CONFIG_H -I. -I. -I../../../../../../..  -I/usr/java/include
> -I/usr/java/include/solaris -I/src
> -I/home/nemahajan/hadoop-install/lzo/lzo-2.02-bin/include -g -Wall -fPIC
> -O2 -m -g -O2 -MT ZlibCompressor.lo -MD -MP -MF
> ".deps/ZlibCompressor.Tpo" -c -o ZlibCompressor.lo ZlibCompressor.c; \
> then mv -f ".deps/ZlibCompressor.Tpo" ".deps/ZlibCompressor.Plo"; else
> rm -f ".deps/ZlibCompressor.Tpo"; exit 1; fi
> gcc -DHAVE_CONFIG_H -I. -I. -I../../../../../../.. -I/usr/java/include
> -I/usr/java/include/solaris -I/src
> -I/home/nemahajan/hadoop-install/lzo/lzo-2.02-bin/include -g -Wall -fPIC
> -O2 -m -g -O2 -MT ZlibCompressor.lo -MD -MP -MF .deps/ZlibCompressor.Tpo
> -c ZlibCompressor.c  -fPIC -DPIC -o .libs/ZlibCompressor.o
> cc1: error: missing argument to "-m"
> gmake[2]: *** [ZlibCompressor.lo] Error 1
> gmake[2]: Leaving directory
> `/home/nemahajan/hadoop-install/hadoop-0.13.0/src/native/src/org/apache/
> hadoop/io/compress/zlib'
> gmake[1]: *** [all-recursive] Error 1
> gmake[1]: Leaving directory
> `/home/nemahajan/hadoop-install/hadoop-0.13.0/src/native'
>
>
> Any idea how this can be resolved?
>
> Thanks,
> Neeraj
>
Reply | Threaded
Open this post in threaded view
|

RE: Build failing for native code

Mahajan, Neeraj
The problem is how to fix it ... What in which script needs to be
changed to fix this?

~ Neeraj

-----Original Message-----
From: Phantom [mailto:[hidden email]]
Sent: Monday, June 18, 2007 7:54 PM
To: [hidden email]
Subject: Re: Build failing for native code

By looking at the gcc command that you have a -m in it. It needs to be
either -m32 or -m64 depending on whether your machine is a 32 or 64 bit
machine.

A

On 6/18/07, Mahajan, Neeraj <[hidden email]> wrote:

>
> Hi,
>
> I am trying to build the native code (which includes the compression
> library) on Solaris 10 (x86 64-bit). I get the following error while
> building:
>
> gmake  all-recursive
> gmake[1]: Entering directory
> `/home/nemahajan/hadoop-install/hadoop-0.13.0/src/native'
> Making all in src/org/apache/hadoop/io/compress/zlib
> gmake[2]: Entering directory
> `/home/nemahajan/hadoop-install/hadoop-0.13.0/src/native/src/org/apach
> e/
> hadoop/io/compress/zlib'
> if /bin/sh ../../../../../../../libtool --mode=compile gcc
> -DHAVE_CONFIG_H -I. -I. -I../../../../../../..  -I/usr/java/include
> -I/usr/java/include/solaris -I/src
> -I/home/nemahajan/hadoop-install/lzo/lzo-2.02-bin/include -g -Wall
> -fPIC
> -O2 -m -g -O2 -MT ZlibCompressor.lo -MD -MP -MF
> ".deps/ZlibCompressor.Tpo" -c -o ZlibCompressor.lo ZlibCompressor.c; \

> then mv -f ".deps/ZlibCompressor.Tpo" ".deps/ZlibCompressor.Plo"; else

> rm -f ".deps/ZlibCompressor.Tpo"; exit 1; fi gcc -DHAVE_CONFIG_H -I.
> -I. -I../../../../../../.. -I/usr/java/include
> -I/usr/java/include/solaris -I/src
> -I/home/nemahajan/hadoop-install/lzo/lzo-2.02-bin/include -g -Wall
> -fPIC
> -O2 -m -g -O2 -MT ZlibCompressor.lo -MD -MP -MF
> .deps/ZlibCompressor.Tpo -c ZlibCompressor.c  -fPIC -DPIC -o
> .libs/ZlibCompressor.o
> cc1: error: missing argument to "-m"
> gmake[2]: *** [ZlibCompressor.lo] Error 1
> gmake[2]: Leaving directory
> `/home/nemahajan/hadoop-install/hadoop-0.13.0/src/native/src/org/apach
> e/
> hadoop/io/compress/zlib'
> gmake[1]: *** [all-recursive] Error 1
> gmake[1]: Leaving directory
> `/home/nemahajan/hadoop-install/hadoop-0.13.0/src/native'
>
>
> Any idea how this can be resolved?
>
> Thanks,
> Neeraj
>
Reply | Threaded
Open this post in threaded view
|

RE: Build failing for native code

Mahajan, Neeraj
I made one mistake here. I ran make directly in the native folder. I
think you should run 'ant compile-core-native' in the project root
folder.

Anyways, ant also didn't work as I didn't have dumpbin on my system. I
had to compile binutils for that. I also saw that the shell script
complained about svn not being found. I compile svn too. And added both
to path and my ant compile-core-native was successful. This built the
libhadoop.* files.

I really wish that all the scripts were written for pure bourne shell
(things like 'export A=..' which can be found in the scripts, do not
work with Solaris sh) and checks for utilities like dumpbin (which is
required) be done at configure level.

~ Neeraj

-----Original Message-----
From: Mahajan, Neeraj [mailto:[hidden email]]
Sent: Tuesday, June 19, 2007 9:17 AM
To: [hidden email]
Subject: RE: Build failing for native code

The problem is how to fix it ... What in which script needs to be
changed to fix this?

~ Neeraj

-----Original Message-----
From: Phantom [mailto:[hidden email]]
Sent: Monday, June 18, 2007 7:54 PM
To: [hidden email]
Subject: Re: Build failing for native code

By looking at the gcc command that you have a -m in it. It needs to be
either -m32 or -m64 depending on whether your machine is a 32 or 64 bit
machine.

A

On 6/18/07, Mahajan, Neeraj <[hidden email]> wrote:

>
> Hi,
>
> I am trying to build the native code (which includes the compression
> library) on Solaris 10 (x86 64-bit). I get the following error while
> building:
>
> gmake  all-recursive
> gmake[1]: Entering directory
> `/home/nemahajan/hadoop-install/hadoop-0.13.0/src/native'
> Making all in src/org/apache/hadoop/io/compress/zlib
> gmake[2]: Entering directory
> `/home/nemahajan/hadoop-install/hadoop-0.13.0/src/native/src/org/apach
> e/
> hadoop/io/compress/zlib'
> if /bin/sh ../../../../../../../libtool --mode=compile gcc
> -DHAVE_CONFIG_H -I. -I. -I../../../../../../..  -I/usr/java/include
> -I/usr/java/include/solaris -I/src
> -I/home/nemahajan/hadoop-install/lzo/lzo-2.02-bin/include -g -Wall
> -fPIC
> -O2 -m -g -O2 -MT ZlibCompressor.lo -MD -MP -MF
> ".deps/ZlibCompressor.Tpo" -c -o ZlibCompressor.lo ZlibCompressor.c; \

> then mv -f ".deps/ZlibCompressor.Tpo" ".deps/ZlibCompressor.Plo"; else

> rm -f ".deps/ZlibCompressor.Tpo"; exit 1; fi gcc -DHAVE_CONFIG_H -I.
> -I. -I../../../../../../.. -I/usr/java/include
> -I/usr/java/include/solaris -I/src
> -I/home/nemahajan/hadoop-install/lzo/lzo-2.02-bin/include -g -Wall
> -fPIC
> -O2 -m -g -O2 -MT ZlibCompressor.lo -MD -MP -MF
> .deps/ZlibCompressor.Tpo -c ZlibCompressor.c  -fPIC -DPIC -o
> .libs/ZlibCompressor.o
> cc1: error: missing argument to "-m"
> gmake[2]: *** [ZlibCompressor.lo] Error 1
> gmake[2]: Leaving directory
> `/home/nemahajan/hadoop-install/hadoop-0.13.0/src/native/src/org/apach
> e/
> hadoop/io/compress/zlib'
> gmake[1]: *** [all-recursive] Error 1
> gmake[1]: Leaving directory
> `/home/nemahajan/hadoop-install/hadoop-0.13.0/src/native'
>
>
> Any idea how this can be resolved?
>
> Thanks,
> Neeraj
>