All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] Problems at cross-compiling LVM2-2.02.52
@ 2009-09-22 12:16 John Taylor
  2009-09-22 12:33 ` Alasdair G Kergon
  2009-09-22 12:47 ` Alasdair G Kergon
  0 siblings, 2 replies; 8+ messages in thread
From: John Taylor @ 2009-09-22 12:16 UTC (permalink / raw)
  To: linux-lvm

Hello,

I have some problems at cross-compiling LVM2-2.02.52 (latest release).
The configure argument list is: --prefix=/usr
--build=i486-unknown-linux-gnu --host=x86_64-unknown-linux-gnu
--target=x86_64-unknown-linux-gnu --disable-nls. First of all, I
noticed I can't build LVM2 from a directory different than that where
I extracted the source tarball, because I get the following error when
running make:

make -C doc device-mapper
make[1]: Entering directory `/mnt/clfs/sources/lvm2-build/doc'
Makefile:21: ../../LVM2-2.02.52/make.tmpl: No such file or directory
make[1]: *** No rule to make target `../../LVM2-2.02.52/make.tmpl'.  Stop.
make[1]: Leaving directory `/mnt/clfs/sources/lvm2-build/doc'
make: *** [doc.device-mapper] Error 2

Even when building from the source directory, I get the following error message:

x86_64-unknown-linux-gnu-gcc -o dmsetup dmsetup.o  -fPIC -Wall -Wundef
-Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes
-Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn
-Wformat-security -O2 -Wl,--export-dynamic -L../libdm -L../lib \
	      -L../libdm -ldevmapper -lrt -ldl -lncurses
../libdm/libdevmapper.so: undefined reference to `rpl_malloc'
collect2: ld returned 1 exit status
make[1]: *** [dmsetup] Error 1
make[1]: Leaving directory `/mnt/clfs/sources/LVM2-2.02.52/tools'
make: *** [tools.device-mapper] Error 2

Don't know if it the right way to proceed, but I managed to fix this
by adding ac_cv_func_malloc_0_nonnull=yes to the configure argument
list. Despite of this make install now fails with:

Installing example.conf as /mnt/clfs/etc/lvm/lvm.conf
/usr/bin/install: cannot change ownership of
`/mnt/clfs/etc/lvm/lvm.conf': Operation not permitted
make[1]: *** [install_lvm2] Error 1
make[1]: Leaving directory `/mnt/clfs/sources/LVM2-2.02.52/doc'
make: *** [doc.install] Error 2

Of course I can fix this error by running make install as root, but
since I'm not installing in the host system (DESTDIR=/mnt/clfs), I'd
like to run this command as a user. I suggest to add a
--disable-makeinstall-chown configure option, as util-linux-ng package
do.

What do you think?

Thanks.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-lvm] Problems at cross-compiling LVM2-2.02.52
  2009-09-22 12:16 [linux-lvm] Problems at cross-compiling LVM2-2.02.52 John Taylor
@ 2009-09-22 12:33 ` Alasdair G Kergon
  2009-09-22 12:40   ` John Taylor
  2009-09-22 12:47 ` Alasdair G Kergon
  1 sibling, 1 reply; 8+ messages in thread
From: Alasdair G Kergon @ 2009-09-22 12:33 UTC (permalink / raw)
  To: John Taylor; +Cc: linux-lvm

On Tue, Sep 22, 2009 at 02:16:16PM +0200, John Taylor wrote:
> Installing example.conf as /mnt/clfs/etc/lvm/lvm.conf
> /usr/bin/install: cannot change ownership of
> `/mnt/clfs/etc/lvm/lvm.conf': Operation not permitted
> make[1]: *** [install_lvm2] Error 1
> make[1]: Leaving directory `/mnt/clfs/sources/LVM2-2.02.52/doc'
> make: *** [doc.install] Error 2
 
configure --with-user= --with-group=   ?

Alasdair

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-lvm] Problems at cross-compiling LVM2-2.02.52
  2009-09-22 12:33 ` Alasdair G Kergon
@ 2009-09-22 12:40   ` John Taylor
  0 siblings, 0 replies; 8+ messages in thread
From: John Taylor @ 2009-09-22 12:40 UTC (permalink / raw)
  To: Alasdair G Kergon; +Cc: linux-lvm

Alasdair G Kergon wrote:
> On Tue, Sep 22, 2009 at 02:16:16PM +0200, John Taylor wrote:
>> Installing example.conf as /mnt/clfs/etc/lvm/lvm.conf
>> /usr/bin/install: cannot change ownership of
>> `/mnt/clfs/etc/lvm/lvm.conf': Operation not permitted
>> make[1]: *** [install_lvm2] Error 1
>> make[1]: Leaving directory `/mnt/clfs/sources/LVM2-2.02.52/doc'
>> make: *** [doc.install] Error 2
>  
> configure --with-user= --with-group=   ?

Didn't notice these options, they work. Thanks!

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-lvm] Problems at cross-compiling LVM2-2.02.52
  2009-09-22 12:16 [linux-lvm] Problems at cross-compiling LVM2-2.02.52 John Taylor
  2009-09-22 12:33 ` Alasdair G Kergon
@ 2009-09-22 12:47 ` Alasdair G Kergon
  2009-09-22 13:04   ` John Taylor
  1 sibling, 1 reply; 8+ messages in thread
From: Alasdair G Kergon @ 2009-09-22 12:47 UTC (permalink / raw)
  To: John Taylor; +Cc: linux-lvm

On Tue, Sep 22, 2009 at 02:16:16PM +0200, John Taylor wrote:
> I have some problems at cross-compiling LVM2-2.02.52 (latest release).
> The configure argument list is: --prefix=/usr
> --build=i486-unknown-linux-gnu --host=x86_64-unknown-linux-gnu
> --target=x86_64-unknown-linux-gnu --disable-nls. First of all, I
> noticed I can't build LVM2 from a directory different than that where
> I extracted the source tarball, because I get the following error when
> running make:
> make -C doc device-mapper
> make[1]: Entering directory `/mnt/clfs/sources/lvm2-build/doc'
> Makefile:21: ../../LVM2-2.02.52/make.tmpl: No such file or directory
> make[1]: *** No rule to make target `../../LVM2-2.02.52/make.tmpl'.  Stop.
> make[1]: Leaving directory `/mnt/clfs/sources/lvm2-build/doc'
> make: *** [doc.device-mapper] Error 2
 
Paths are stored by 'configure' - that could be where the problem is, if
the code is moved after running configure, or a path with symlinks is
supplied (so .. goes to the wrong place).
The top of my Makefile is:
  srcdir = .
  top_srcdir = .

'make' is designed only to be run from the top directory of the tree,
not subdirectories.

But your example makes no sense: there is nothing to do for
'device-mapper' in 'doc', and it works for me anyway, both with -C and
using the alternative internal 'dot' target directly.

$ make -C doc device-mapper
make: Entering directory `/d/LVM2/doc'
make: Nothing to be done for `device-mapper'.
make: Leaving directory `/d/LVM2/doc'

$ make doc.device-mapper
make -C doc device-mapper
make[1]: Entering directory `/d/LVM2/doc'
make[1]: Nothing to be done for `device-mapper'.
make[1]: Leaving directory `/d/LVM2/doc'


Alasdair

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-lvm] Problems at cross-compiling LVM2-2.02.52
  2009-09-22 12:47 ` Alasdair G Kergon
@ 2009-09-22 13:04   ` John Taylor
  2009-09-22 13:11     ` Alasdair G Kergon
  0 siblings, 1 reply; 8+ messages in thread
From: John Taylor @ 2009-09-22 13:04 UTC (permalink / raw)
  To: Alasdair G Kergon; +Cc: linux-lvm

Alasdair G Kergon wrote:
> 'make' is designed only to be run from the top directory of the tree,
> not subdirectories.

I'm not running 'make' from a subdirectory of the sources directory, but 
from a directory at its same level. That is, the sources directory is 
/mnt/clfs/sources/LVM2-2.02.52, while the desired build directory is 
/mnt/clfs/sources/lvm2-build. That's the way I usually build packages.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-lvm] Problems at cross-compiling LVM2-2.02.52
  2009-09-22 13:04   ` John Taylor
@ 2009-09-22 13:11     ` Alasdair G Kergon
  2009-09-22 13:23       ` John Taylor
  0 siblings, 1 reply; 8+ messages in thread
From: Alasdair G Kergon @ 2009-09-22 13:11 UTC (permalink / raw)
  To: John Taylor; +Cc: linux-lvm

On Tue, Sep 22, 2009 at 03:04:09PM +0200, John Taylor wrote:
> I'm not running 'make' from a subdirectory of the sources directory, but  
> from a directory at its same level. That is, the sources directory is  
> /mnt/clfs/sources/LVM2-2.02.52, while the desired build directory is  
> /mnt/clfs/sources/lvm2-build. That's the way I usually build packages.

So can you describe the problem more precisely e.g. quoting the
actual command lines/settings that aren't working and you think 
ought to do?

Alasdair

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-lvm] Problems at cross-compiling LVM2-2.02.52
  2009-09-22 13:11     ` Alasdair G Kergon
@ 2009-09-22 13:23       ` John Taylor
  2009-09-22 13:40         ` Alasdair G Kergon
  0 siblings, 1 reply; 8+ messages in thread
From: John Taylor @ 2009-09-22 13:23 UTC (permalink / raw)
  To: Alasdair G Kergon; +Cc: linux-lvm

Alasdair G Kergon wrote:
> So can you describe the problem more precisely e.g. quoting the
> actual command lines/settings that aren't working and you think 
> ought to do?

I'm building packages for my own GNU/Linux system via some bash scripts. 
The one that builds lvm2 is this:

cd ${clfs_sources}
tar --extract --verbose --file=${tarball[lvm2]}
cd ${sources[lvm2]}
./configure --prefix=/usr --build=${clfs_host} --host=${clfs_target} 
--target=${clfs_target} --disable-nls ac_cv_func_malloc_0_nonnull=yes
make
make install DESTDIR=${clfs}
cd ${clfs_sources}
rm --recursive --force --verbose ${sources[lvm2]}

Here the value of the variables:

clfs_sources=/mnt/clfs/sources
tarball[lvm2]=LVM2-2.02.52.tar.xz
sources[lvm2]=LVM2-2.02.52
clfs_host=i486-unknown-linux-gnu
clfs_target=x86_64-unknown-linux-gnu
clfs=/mnt/clfs

I hope it is clear now.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-lvm] Problems at cross-compiling LVM2-2.02.52
  2009-09-22 13:23       ` John Taylor
@ 2009-09-22 13:40         ` Alasdair G Kergon
  0 siblings, 0 replies; 8+ messages in thread
From: Alasdair G Kergon @ 2009-09-22 13:40 UTC (permalink / raw)
  To: John Taylor; +Cc: linux-lvm

On Tue, Sep 22, 2009 at 03:23:02PM +0200, John Taylor wrote:
> I hope it is clear now.

Well it works for me, in that it only gives me the rpl_malloc error, not
the path problem.  

I can see some potential bugs with srcdir in the Makefiles for example,
but can't work out how you would be hitting them with the command lines 
that have posted so far.

Alasdair

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-09-22 13:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-22 12:16 [linux-lvm] Problems at cross-compiling LVM2-2.02.52 John Taylor
2009-09-22 12:33 ` Alasdair G Kergon
2009-09-22 12:40   ` John Taylor
2009-09-22 12:47 ` Alasdair G Kergon
2009-09-22 13:04   ` John Taylor
2009-09-22 13:11     ` Alasdair G Kergon
2009-09-22 13:23       ` John Taylor
2009-09-22 13:40         ` Alasdair G Kergon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.