Port-xen archive

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

Re: xentools build failure (ocaml related)



On Fri, 8 Jan 2021 at 22:10, Manuel Bouyer <bouyer%antioche.eu.org@localhost> wrote:
>
> On Tue, Jan 05, 2021 at 08:11:00PM +0000, Chavdar Ivanov wrote:
> > > > Is this a known issue? Should I send-pr?
> > >
> > > Kown issue, I don't know how to fix yet, other than rebuilding ocaml
> > > without -force-safe-string ...
> >
> > FWIW I just finished a build of the latest xentools 4.13. I had to
> > manually do the following:
> >
> > 1. Patch string.c from seabios  (earlier suggestion):
> >
> > diff -u work/seabios-rel-1.12.1/src/string.c.orig
> > work/seabios-rel-1.12.1/src/string.c
> > --- work/seabios-rel-1.12.1/src/string.c.orig     2019-03-14
> > 12:11:53.000000000 +0000
> > +++ work/seabios-rel-1.12.1/src/string.c        2021-01-05
> > 19:49:00.426549269 +0000
> > @@ -152,9 +152,6 @@
> >  void *
> >  #undef memcpy
> >  memcpy(void *d1, const void *s1, size_t len)
> > -#if MODESEGMENT == 0
> > -#define memcpy __builtin_memcpy
> > -#endif
> >  {
> >      SET_SEG(ES, GET_SEG(SS));
> >      void *d = d1;
> >
>
> I don't undertand why you need this. If certainly builds fine for me without

I always get - under -current - the following:
............
  Linking out/rom.o
ld -N -T out/romlayout32flat.lds out/rom16.strip.o
out/rom32seg.strip.o out/code32flat.o -o out/rom.o
ld: out/code32flat.o: in function `memmove':
/usr/pkgsrc/sysutils/xentools413/work/seabios-rel-1.12.1/./src/string.c:206:
undefined reference to `memcpy'
ld: out/code32flat.o: in function `const_read_file':
/usr/pkgsrc/sysutils/xentools413/work/seabios-rel-1.12.1/./src/romfile.c:116:
undefined reference to `memcpy'
ld: out/code32flat.o: in function `tpm_log_event':
/usr/pkgsrc/sysutils/xentools413/work/seabios-rel-1.12.1/./src/tcgbios.c:131:
undefined reference to `memcpy'
ld: /usr/pkgsrc/sysutils/xentools413/work/seabios-rel-1.12.1/./src/tcgbios.c:134:
undefined reference to `memcpy'
ld: out/code32flat.o: in function `smm_save_and_copy':
/usr/pkgsrc/sysutils/xentools413/work/seabios-rel-1.12.1/./src/fw/smm.c:148:
undefined reference to `memcpy'
ld: out/code32flat.o:/usr/pkgsrc/sysutils/xentools413/work/seabios-rel-1.12.1/./src/fw/smm.c:171:
more undefined references to `memcpy' follow
gmake[6]: *** [Makefile:186: out/rom.o] Error 1
gmake[6]: Leaving directory
'/usr/pkgsrc/sysutils/xentools413/work/seabios-rel-1.12.1'
...........

The patch was suggested earlier ( see
https://mail-index.netbsd.org/current-users/2020/10/24/msg039742.html
).


>
> >
> > 2. Get rid of "-unsafe-string" from work/xen-4.13.2/tools/ocaml/common.make
> >
> > 3. Add "-Wno-error=discarded-qualifiers" to the Makefile.rules file.
> >
> > No idea if the resulting kit will work, though. I haven't tried xen
> > for a while under NetBSD; one of these days, perhaps...
>
> it works, I committed these fixes.
> thanks !
>
> --
> Manuel Bouyer <bouyer%antioche.eu.org@localhost>
>      NetBSD: 26 ans d'experience feront toujours la difference
> --



--
----


Home | Main Index | Thread Index | Old Index