Re: Linking fails on FreeBSD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 29, 2013 at 05:23:40PM +0400, Roman Bogorodskiy wrote:
>   Daniel P. Berrange wrote:
> 
> > On Mon, Jul 29, 2013 at 10:30:15AM +0400, Roman Bogorodskiy wrote:
> > > Hi,
> > > 
> > > Linking fails on FreeBSD:
> > > 
> > >   CCLD     libvirt.la
> > >   /usr/bin/ld: ./.libs/libvirt_util.a(libvirt_util_la-vircgroup.o):
> > >   relocation R_X86_64_PC32 against `virCgroupPartitionEscape' can not be
> > >   used when making a shared object; recompile with -fPIC
> > >   /usr/bin/ld: final link failed: Bad value
> > > 
> > > Following the suggestion and re-compiling with -fPIC doesn't help.
> > > Anybody has an idea how to fix that?
> > 
> > Try building with thsi patch
> > 
> > diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
> > index 68ec953..62b1b1e 100644
> > --- a/src/util/vircgroup.c
> > +++ b/src/util/vircgroup.c
> > @@ -95,6 +95,7 @@ bool virCgroupAvailable(void)
> >      return ret;
> >  }
> >  
> > +#if defined HAVE_MNTENT_H && defined HAVE_GETMNTENT_R
> >  static bool
> >  virCgroupValidateMachineGroup(virCgroupPtr group,
> >                                const char *name,
> > @@ -149,7 +150,16 @@ virCgroupValidateMachineGroup(virCgroupPtr group,
> >      VIR_FREE(partname);
> >      return valid;
> >  }
> > -
> > +#else
> > +static bool
> > +virCgroupValidateMachineGroup(virCgroupPtr group ATTRIBUTE_UNUSED,
> > +                              const char *name ATTRIBUTE_UNUSED,
> > +                              const char *drivername ATTRIBUTE_UNUSED,
> > +                              bool stripEmulatorSuffix ATTRIBUTE_UNUSED)
> > +{
> > +    return true;
> > +}
> > +#endif
> >  
> >  /**
> >   * virCgroupFree:
> 
> Yes, it works, thanks!

Ok, I'll push this shortly.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]