On Fri, Sep 01, 2017 at 04:28:52AM -0400, Yongkui Guo wrote:
> stamp-mlguestfs: libguestfsocaml.a $(guestfs_cmm)
> $(OCAMLMKLIB) -o mlguestfs \
> $(libguestfsocaml_a_OBJECTS) guestfs.cmo \
> $(LDFLAGS) \
> $(LTLIBINTL) \
> - -L../lib/.libs -lguestfs
> + -L../lib/.libs -lguestfs \
> + -L../gnulib/lib/.libs -lgnu
[...]
ocamlmklib -o mlguestfs \
libguestfsocaml_a-guestfs-c.o libguestfsocaml_a-guestfs-c-actions.o
libguestfsocaml_a-guestfs-c-errnos.o ../common/utils/libguestfsocaml_a-utils.o guestfs.cmo
\
-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld \
The problem is unrelated to the patch.
$(LDFLAGS) are added to the ocamlmklib command, but ocamlmklib only
understands a limited subset of linker flags, including -L but not
including -Wl.
Possibly something like this might work:
stamp-mlguestfs: libguestfsocaml.a $(guestfs_cmm)
$(OCAMLMKLIB) -o mlguestfs \
$(libguestfsocaml_a_OBJECTS) guestfs.cmo \
- $(LDFLAGS) \
+ -ldopt '$(LDFLAGS)' \
$(LTLIBINTL) \
-L../lib/.libs -lguestfs
(in all the places where $(LDFLAGS) is passed to ocamlmklib).
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/