Bug#754792: libbfio: FTBFS on hurd-386

Svante Signell svante.signell at gmail.com
Mon Aug 25 09:15:14 UTC 2014


found 754792 20140105-1
thanks

On Thu, 2014-08-21 at 21:36 +0200, Pierre Chifflier wrote:
> On Mon, Jul 14, 2014 at 01:15:26PM +0200, Svante Signell wrote:
> > Source: libbfio
> > Version: 20130507-1
> > Severity: important
> > Tags: patch
> > User: debian-hurd at lists.debian.org
> > Usertags: hurd
> > 
> > Hello,
> > 
> > libbfio fails to build from source due to usage of PATH_MAX,which is not
> > defined on GNU/Hurd. The attached patch fixes usage of PATH_MAX as
> > second argument to getcwd() by using calls to getcwd (NULL, 0) instead.
> > Supporting (NULL, 0) as arguments is an extension to POSIX.1-2001 for
> > libc4, libc5 and glibc, so most modern systems have it. In order to
> > simplify the patch, only this version is implemented.
> 
> Hi Svante,
> 
> I just uploaded new upstream versions for libbfio and libewf.
> 
> Unfortunately, the patches you sent no longer apply, since the code has
> changed. I had a quick look, but could not determine what would be the
> proper way to fix the build on hurd (and probably kfreebsd).
> If you have some time to look at the new version, it would be great so
> the package could be fixed before the release.
> 
> Here are a few more comments/questions on the patch:
> 
> 
> > Index: libbfio-20130507/libcpath/libcpath_path.c
> > ===================================================================
> > --- libbfio-20130507.orig/libcpath/libcpath_path.c
> > +++ libbfio-20130507/libcpath/libcpath_path.c
> > @@ -356,9 +356,6 @@ int libcpath_path_get_current_working_di
> >  	}
> >  #if defined( WINAPI )
> >  	*current_working_directory_size = (size_t) _MAX_PATH;
> > -#else
> > -	*current_working_directory_size = (size_t) PATH_MAX;
> > -#endif
> >  	*current_working_directory = libcstring_narrow_string_allocate(
> >  	                              *current_working_directory_size );
> >  
> 
> If I understand correctly, current_working_directory_size is now
> uninitialized ? Shouldn't it be set to 0 explicitly ?

This no longer applies, see the attached updated patch.

> 
> > @@ -387,7 +384,6 @@ int libcpath_path_get_current_working_di
> > +	*current_working_directory = getcwd (NULL, 0);
> 
> The getcwd manpage says that the allocation of memory is an extension to
> the POSIX.1-2001 standard, so it seems Linux-specific. Will this cause
> any problem on other platforms (I suppose Hurd is OK, but what about
> kFreeBSD ?).

Support for getcwd (NULL, 0) is available in all glibc-based
distributions. That includes at least Linux, kFreeBSD and Hurd.

Attached is also a build dependency on quilt in debian/control. I don't
know if this is strictly needed, but is included for completeness. The
source directory does not have a debian/patches directory since no
patches are present currently. However, the source format is 3.0
(quilt).

Thanks!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: control.patch
Type: text/x-patch
Size: 489 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/forensics-devel/attachments/20140825/94ec3264/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: path_max.patch
Type: text/x-patch
Size: 2218 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/forensics-devel/attachments/20140825/94ec3264/attachment-0003.bin>


More information about the forensics-devel mailing list