On 2019/12/30 18:02, Theo Buehler wrote:
> On Mon, Dec 30, 2019 at 04:53:06PM +0100, Stephane Guedon wrote:
> > Le dimanche 29 décembre 2019, 23:56:57 CET Theo Buehler a écrit :
> > > > That's a problem on my side, I will sort it and retry.
> > > 
> > > This diff fixes it:
> > > 
> > > Index: libvips/iofuncs/init.c
> > > --- libvips/iofuncs/init.c.orig
> > > +++ libvips/iofuncs/init.c
> > > @@ -858,7 +858,7 @@ extract_prefix( const char *dir, const char *name
> > > ) for( i = 0; i < (int) strlen( vname ); i++ )
> > >           if( vips_isprefix( G_DIR_SEPARATOR_S "." 
> > G_DIR_SEPARATOR_S,
> > >                   vname + i ) )
> > > -                 memcpy( vname + i, vname + i + 2,
> > > +                 memmove( vname + i, vname + i + 2,
> > >                           strlen( vname + i + 2 ) + 1 );
> > >   if( vips_ispostfix( vname, G_DIR_SEPARATOR_S "." ) )
> > >           vname[strlen( vname ) - 2] = '\0';
> > 
> > I think I should not integrate it in the port, right ? I can build the 
> > port on my own.
> 
> On the contrary, it's an obvious bug with an obvious fix that prevents
> successful builds in some environments. I think the fix should be
> included in the port and also be reported upstream by someone who has an
> actual interest in this port (not me).
> 
> I have tried to build it on two of my amd64 boxes and hit this backwards
> memcpy every time. Apparently the same is true for Denis's main machine.
> I don't know what's different on the machines where it builds.
> 

Mine too.

With DEBUG defined in libvips/iofuncs/init.c:

vips_guess_prefix: g_getenv( "PATH" ) == 
"/usr/obj/ports/vips-8.8.4/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11R6/bin"
scan_path: looking in "/usr/obj/ports/vips-8.8.4/bin" for "introspect"
scan_path: looking in "/usr/bin" for "introspect"
scan_path: looking in "/bin" for "introspect"
scan_path: looking in "/usr/sbin" for "introspect"
scan_path: looking in "/sbin" for "introspect"
scan_path: looking in "/usr/local/bin" for "introspect"
scan_path: looking in "/usr/X11R6/bin" for "introspect"
extract_prefix: trying for dir = 
"/usr/obj/ports/vips-8.8.4/build-amd64/libvips/./.libs/introspect", name = 
"introspect"
Command '['./.libs/introspect', 
'--introspect-dump=/tmp/tmp-introspectlvgrpjmh/functions.txt,/tmp/tmp-introspectlvgrpjmh/dump.xml']'
 died with <Signals.SIGABRT: 6>.

This code that tries to figure out the likely prefix based on the
program name. I think it fails every time unless "introspect" is on the
path. For the port I think this makes no sense, it should probably be
excised and pointed directly at ${TRUEPREFIX} instead.

Reply via email to