* [Buildroot] partclone package issues
2014-10-10 19:46 [Buildroot] partclone package issues Michael Sumulong
@ 2014-10-11 21:24 ` Thomas Petazzoni
2014-10-15 17:26 ` Arnout Vandecappelle
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2014-10-11 21:24 UTC (permalink / raw)
To: buildroot
Dear Michael Sumulong,
On Fri, 10 Oct 2014 15:46:02 -0400, Michael Sumulong wrote:
> I think my issue is that the partclone/configure.ac invokes a shell command
> to compile a .c file but uses a hardcoded 'gcc' in the shell command. I
> changed the gcc to use $cc but now it cannot find the libext2fs shared
> object file. I do see libext2fs.a in output/host/usr/lib but not
> libext2fs.so.2.
[...]
> partclone-0.2.70/configure.ac:
>
> if test "$enable_extfs" = "yes"; then
> #check library of some filesystems
> dnl Check for EXT2/3
> AC_CHECKING([ for EXT2/3 Library and Header files ... ])
> AC_CHECK_HEADERS([ext2fs/ext2fs.h], ,
> AC_MSG_ERROR([*** EXT2/3 header files (ext2fs/ext2fs.h) not found])
> )
> AC_CHECK_LIB([ext2fs], [ext2fs_initialize], true,
> AC_MSG_ERROR([*** EXT2/3 library (libext2fs) not found]))
>
> AC_MSG_CHECKING(version of libextfs)
> extfs_version=`$cc $srcdir/src/deplib_version.c -o $srcdir/get_lib_version
> -lext2fs -DEXTFS`
> extfs_version=`$srcdir/get_lib_version extfs`
That will not work, even using $cc, because the entire approach used in
their configure.ac script is broken: they don't simply build something,
but they also run it. So even if you manage to build this tool with $CC
pointing to the cross-compiler, there is no way the resulting binary
can be executed on your build machine.
So, instead, I'd suggest to completely remove their libext2fs version
check and instead simply use pkg-config to test that. Replace all their
version testing crap by one single line:
PKG_CHECK_MODULES([LIBEXT2FS], [libext2fs >= 1.42])
and that's it.
Of course, don't forget to add host-pkgconf to PARTCLONE_DEPENDENCIES.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] partclone package issues
2014-10-10 19:46 [Buildroot] partclone package issues Michael Sumulong
2014-10-11 21:24 ` Thomas Petazzoni
@ 2014-10-15 17:26 ` Arnout Vandecappelle
1 sibling, 0 replies; 3+ messages in thread
From: Arnout Vandecappelle @ 2014-10-15 17:26 UTC (permalink / raw)
To: buildroot
On 10/10/14 21:46, Michael Sumulong wrote:
[snip]
> partclone-0.2.70/configure.ac <http://configure.ac>:
>
> if test "$enable_extfs" = "yes"; then
> #check library of some filesystems
> dnl Check for EXT2/3
> AC_CHECKING([ for EXT2/3 Library and Header files ... ])
> AC_CHECK_HEADERS([ext2fs/ext2fs.h], ,
> AC_MSG_ERROR([*** EXT2/3 header files (ext2fs/ext2fs.h) not found])
> )
> AC_CHECK_LIB([ext2fs], [ext2fs_initialize], true,
> AC_MSG_ERROR([*** EXT2/3 library (libext2fs) not found]))
>
> AC_MSG_CHECKING(version of libextfs)
> extfs_version=`$cc $srcdir/src/deplib_version.c -o $srcdir/get_lib_version
> -lext2fs -DEXTFS`
> extfs_version=`$srcdir/get_lib_version extfs`
This thing is clearly not cross-compile friendly. You'll have to add a patch
that replaces all this rubbish with something using PKG_CHECK_MODULES. It should
actually also update CFLAGS and LDFLAGS according the pkg-config results, so it
won't be completely trivial. But you should be able to replace about 20 lines of
configure.ac with just 4 lines using PKG_CHECK_MODULES.
Preferably, you should also upstream that patch to introduce PKG_CHECK_MODULES,
so we don't have to carry that patch forever.
Regards,
Arnout
>
>
> partclone.mk <http://partclone.mk>:
>
> PARTCLONE_VERSION = 0.2.70
> PARTCLONE_SOURCE = partclone-$(PARTCLONE_VERSION).tar.gz
> PARTCLONE_SITE = http://sourceforge.net/projects/partclone/files/testing/src/
> PARTCLONE_INSTALL_STAGING = YES
> PARTCLONE_INSTALL_TARGET = YES
> PARTCLONE_AUTORECONF = YES
> PARTCLONE_DEPENDENCIES = attr e2fsprogs libgcrypt lzo xz zlib
> PARTCLONE_CONF_OPT = --enable-ntfs --enable-extfs --enable-fat --enable-ncursesw
>
> $(eval $(autotools-package))
>
>
> Thanks,
> Mike
>
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
^ permalink raw reply [flat|nested] 3+ messages in thread