Le 03/12/2010 16:24, Sylvain Le Gall a écrit : >> There is a problem with inversion of flags for library in pcre-ocaml. I >> had a discussion about this issue with Arch Linux pcre-ocaml (and oasis) >> maintainer. >> [...] > I fixed it in the pcre-ocaml package: > > > > > > --- pcre-ocaml.orig/src/pcre-ocaml-release-6.1.1/lib/Makefile > > > +++ pcre-ocaml/src/pcre-ocaml-release-6.1.1/lib/Makefile > > > @@ -3,7 +3,7 @@ OCAMLMAKEFILE = ../OCamlMakefile > > > SOURCES := pcre.mli pcre.ml pcre_stubs.c > > > CFLAGS := -O2 $(shell pcre-config --cflags) > > > PCRE_FLAGS := $(shell pcre-config --libs) > > > -OCAMLLDFLAGS := -cclib "$(PCRE_FLAGS)" > > > +OCAMLLDFLAGS := -cclib -lpcre_stubs -cclib "$(PCRE_FLAGS)" > > > OCAMLMKLIB_FLAGS := $(PCRE_FLAGS) > > > RESULT := pcre > > > > > > (the patch is from Magnus Therning)
I independently came up with the attached patch against the version in git (didn't check yours), and checked that cameleon, cduce, ceve, galax, json-wheel, matita, ocsigen and pkglab build successfully. I pushed it for reference; however, the next sid version will (most likely) be a new upstream release. Has a patch been forwarded upstream, BTW? -- Stéphane
From: Stephane Glondu <[email protected]> Date: Fri, 3 Dec 2010 23:18:19 +0100 Subject: [PATCH] Change position of flag -lpcre This fixes FTBFS of reverse dependencies when --as-needed is on by default (in Ubuntu since natty). Signed-off-by: Stephane Glondu <[email protected]> --- OCamlMakefile | 9 +-------- lib/Makefile | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/OCamlMakefile b/OCamlMakefile index d1060eb..a558021 100644 --- a/OCamlMakefile +++ b/OCamlMakefile @@ -62,6 +62,7 @@ export OCAML_DEFAULT_DIRS export LIBS export CLIBS +export CLIBS_OPTS export CFRAMEWORKS export OCAMLFLAGS @@ -597,14 +598,6 @@ else $(OCAML_DEFAULT_DIRS:%=-LIBPATH:%) " endif -CLIBS_OPTS := $(CLIBS:%=-cclib -l%) $(CFRAMEWORKS:%=-cclib '-framework %') -ifdef MSVC - ifndef STATIC - # MSVC libraries do not have 'lib' prefix - CLIBS_OPTS := $(CLIBS:%=-cclib %.lib) - endif -endif - ifneq ($(strip $(OBJ_LINK)),) ifdef CREATE_LIB OBJS_LIBS := -cclib -l$(CLIB_BASE) $(CLIBS_OPTS) $(MAYBE_IDL) diff --git a/lib/Makefile b/lib/Makefile index 96c23fa..aa0edbb 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -3,7 +3,7 @@ OCAMLMAKEFILE = ../OCamlMakefile SOURCES := pcre.mli pcre.ml pcre_stubs.c CFLAGS := -O2 $(shell pcre-config --cflags) PCRE_FLAGS := $(shell pcre-config --libs) -OCAMLLDFLAGS := -cclib "$(PCRE_FLAGS)" +CLIBS_OPTS := -cclib "$(PCRE_FLAGS)" OCAMLMKLIB_FLAGS := $(PCRE_FLAGS) RESULT := pcre --

