Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opam installation broken on FreeBSD #61

Closed
slegrand45 opened this issue Nov 1, 2014 · 15 comments
Closed

opam installation broken on FreeBSD #61

slegrand45 opened this issue Nov 1, 2014 · 15 comments

Comments

@slegrand45
Copy link
Contributor

Hi,

Tested with tyxml.3.3.0 opam package on FreeBSD:

Building uutf.0.9.3:
./pkg/pkg-git
./pkg/build true
Installing uutf.0.9.3.
Building tyxml.3.3.0:
./configure --enable-syntax --prefix /sequoia/.opam/4.02.1
gmake
gmake install
[ERROR] The compilation of tyxml.3.3.0 failed.
Removing tyxml.3.3.0.
ocamlfind remove tyxml

#=== ERROR while installing tyxml.3.3.0 =======================================#

opam-version 1.2.0

os freebsd

command ./configure --enable-syntax --prefix /sequoia/.opam/4.02.1

path /sequoia/.opam/4.02.1/build/tyxml.3.3.0

compiler 4.02.1

exit-code 2

env-file /sequoia/.opam/4.02.1/build/tyxml.3.3.0/tyxml-65153-ffb3fd.env

stdout-file /sequoia/.opam/4.02.1/build/tyxml.3.3.0/tyxml-65153-ffb3fd.out

stderr-file /sequoia/.opam/4.02.1/build/tyxml.3.3.0/tyxml-65153-ffb3fd.err

stderr

make: don't know how to make ./setup.exe. Stop

=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
These actions have been completed successfully

  • install uutf.0.9.3

The following failed

  • install tyxml.3.3.0
@Drup
Copy link
Member

Drup commented Nov 1, 2014

Can you give the output with --verbose ?

@slegrand45
Copy link
Contributor Author

stephane@sequoia:/sequoia/ocaml/ocaml-contribs/tyxml % opam install tyxml --verbose
The following actions will be performed:

  • install tyxml.3.3.0
    === 1 to install ===

=-=- Synchronizing package archives -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

=-=- Installing packages =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Building tyxml.3.3.0:
./configure --enable-syntax --prefix /sequoia/.opam/4.02.1
gmake
gmake install
make: don't know how to make ./setup.exe. Stop
[ERROR] The compilation of tyxml.3.3.0 failed.
Removing tyxml.3.3.0.
ocamlfind remove tyxml
ocamlfind: [WARNING] No such directory: /sequoia/.opam/4.02.1/lib/tyxml

#=== ERROR while installing tyxml.3.3.0 =======================================#

opam-version 1.2.0

os freebsd

command ./configure --enable-syntax --prefix /sequoia/.opam/4.02.1

path /sequoia/.opam/4.02.1/build/tyxml.3.3.0

compiler 4.02.1

exit-code 2

env-file /sequoia/.opam/4.02.1/build/tyxml.3.3.0/tyxml-70700-5f1023.env

stdout-file /sequoia/.opam/4.02.1/build/tyxml.3.3.0/tyxml-70700-5f1023.out

stderr-file /sequoia/.opam/4.02.1/build/tyxml.3.3.0/tyxml-70700-5f1023.err

stderr

make: don't know how to make ./setup.exe. Stop

'opam install tyxml --verbose' failed.

And the Makefile is the following one (notice the ./ for the SETUP var):

OASIS_START

DO NOT EDIT (digest: 46f8bd9984975bd4727bed22d0876cd2)

SETUP = ./setup.exe

build: setup.data $(SETUP)
$(SETUP) -build $(BUILDFLAGS)

doc: setup.data $(SETUP) build
$(SETUP) -doc $(DOCFLAGS)

test: setup.data $(SETUP) build
$(SETUP) -test $(TESTFLAGS)

all: $(SETUP)
$(SETUP) -all $(ALLFLAGS)

install: setup.data $(SETUP)
$(SETUP) -install $(INSTALLFLAGS)

uninstall: setup.data $(SETUP)
$(SETUP) -uninstall $(UNINSTALLFLAGS)

reinstall: setup.data $(SETUP)
$(SETUP) -reinstall $(REINSTALLFLAGS)

clean: $(SETUP)
$(SETUP) -clean $(CLEANFLAGS)

distclean: $(SETUP)
$(SETUP) -distclean $(DISTCLEANFLAGS)
$(RM) $(SETUP)

setup.data: $(SETUP)
$(SETUP) -configure $(CONFIGUREFLAGS)

configure: $(SETUP)
$(SETUP) -configure $(CONFIGUREFLAGS)

setup.exe: setup.ml
ocamlfind ocamlopt -o $@ $< || ocamlfind ocamlc -o $@ $< || true
$(RM) setup.cmi setup.cmo setup.cmx setup.o

.PHONY: build doc test all install uninstall reinstall clean distclean configure

OASIS_STOP

wikidoc: $(SETUP) setup.data build
$(SETUP) -build tyxml-api.wikidocdir/index.wiki

FWIW, if i go to the build directory and type "gmake setup.exe", it is able to build the setup.exe file. Otherwise, this file doesn't exist in the build directory.

@Drup
Copy link
Member

Drup commented Nov 2, 2014

Try to pin the git version (opam pin add tyxml https://github.com/ocsigen/tyxml.git). The issue should be solved.

@Drup
Copy link
Member

Drup commented Nov 2, 2014

I've reported the issue upstream to oasis here.

@kit-ty-kate
Copy link
Member

Is it working if you replace all the $(SETUP) in the rules (not the dependencies) to ./$(SETUP) and replace the line ?:

SETUP = ./setup.exe

by this one

SETUP = setup.exe

@slegrand45
Copy link
Contributor Author

I can confirm that with the current version of tyxml ("opam pin add tyxml https://github.com/ocsigen/tyxml.git") the installation now works.

Thank you very much! Merci beaucoup !

@Drup Drup closed this as completed Nov 2, 2014
@kit-ty-kate
Copy link
Member

If you can test the thing above as well with the old Makefile, it would be super.
If something is broken it's always great to have it fixed in the next version, don't you think ?

@slegrand45
Copy link
Contributor Author

The issue is now solved but just to complete the history, i also tried the suggestion from jpdeplaix. And that doesn't work, i get the following error:

stephane@sequoia:/sequoia/.opam/4.02.1/build/tyxml.3.3.0 % ./configure --enable-syntax --prefix /sequoia/.opam/4.02.1
ocamlfind ocamlopt -o setup.exe  || ocamlfind ocamlc -o setup.exe  || true
setup.cmi setup.cmo setup.cmx setup.o
setup.cmi: No such file or directory
*** [setup.exe] Error code 1

Stop in /sequoia/.opam/4.02.1/build/tyxml.3.3.0.

The Makefile modified for this test:

# OASIS_START
# DO NOT EDIT (digest: 46f8bd9984975bd4727bed22d0876cd2)

SETUP = setup.exe

build: setup.data $(SETUP)
    ./$(SETUP) -build $(BUILDFLAGS)

doc: setup.data $(SETUP) build
    ./$(SETUP) -doc $(DOCFLAGS)

test: setup.data $(SETUP) build
    ./$(SETUP) -test $(TESTFLAGS)

all: $(SETUP)
    ./$(SETUP) -all $(ALLFLAGS)

install: setup.data $(SETUP)
    ./$(SETUP) -install $(INSTALLFLAGS)

uninstall: setup.data $(SETUP)
    ./$(SETUP) -uninstall $(UNINSTALLFLAGS)

reinstall: setup.data $(SETUP)
    ./$(SETUP) -reinstall $(REINSTALLFLAGS)

clean: $(SETUP)
    ./$(SETUP) -clean $(CLEANFLAGS)

distclean: $(SETUP)
    ./$(SETUP) -distclean $(DISTCLEANFLAGS)
    $(RM) ./$(SETUP)

setup.data: $(SETUP)
    ./$(SETUP) -configure $(CONFIGUREFLAGS)

configure: $(SETUP)
    ./$(SETUP) -configure $(CONFIGUREFLAGS)

setup.exe: setup.ml
    ocamlfind ocamlopt -o $@ $< || ocamlfind ocamlc -o $@ $< || true
    $(RM) setup.cmi setup.cmo setup.cmx setup.o

.PHONY: build doc test all install uninstall reinstall clean distclean configure

# OASIS_STOP

wikidoc: $(SETUP) setup.data build
    ./$(SETUP) -build tyxml-api.wikidocdir/index.wiki

@kit-ty-kate
Copy link
Member

Ok, it looks like there is no default $(RM). Can you try to add this ?

RM = rm -f

@slegrand45
Copy link
Contributor Author

Nope:

stephane@sequoia:/sequoia/.opam/4.02.1/build/tyxml.3.3.0 % ./configure --enable-syntax --prefix /sequoia/.opam/4.02.1
ocamlfind ocamlopt -o setup.exe  || ocamlfind ocamlc -o setup.exe  || true
rm -f setup.cmi setup.cmo setup.cmx setup.o
./setup.exe -configure --enable-syntax --prefix /sequoia/.opam/4.02.1
./setup.exe: No such file or directory
*** [configure] Error code 1

Stop in /sequoia/.opam/4.02.1/build/tyxml.3.3.0.

The Makefile:

# OASIS_START
# DO NOT EDIT (digest: 46f8bd9984975bd4727bed22d0876cd2)

SETUP = setup.exe
RM = rm -f

build: setup.data $(SETUP)
    ./$(SETUP) -build $(BUILDFLAGS)

doc: setup.data $(SETUP) build
    ./$(SETUP) -doc $(DOCFLAGS)

test: setup.data $(SETUP) build
    ./$(SETUP) -test $(TESTFLAGS)

all: $(SETUP)
    ./$(SETUP) -all $(ALLFLAGS)

install: setup.data $(SETUP)
    ./$(SETUP) -install $(INSTALLFLAGS)

uninstall: setup.data $(SETUP)
    ./$(SETUP) -uninstall $(UNINSTALLFLAGS)

reinstall: setup.data $(SETUP)
    ./$(SETUP) -reinstall $(REINSTALLFLAGS)

clean: $(SETUP)
    ./$(SETUP) -clean $(CLEANFLAGS)

distclean: $(SETUP)
    ./$(SETUP) -distclean $(DISTCLEANFLAGS)
    $(RM) ./$(SETUP)

setup.data: $(SETUP)
    ./$(SETUP) -configure $(CONFIGUREFLAGS)

configure: $(SETUP)
    ./$(SETUP) -configure $(CONFIGUREFLAGS)

setup.exe: setup.ml
    ocamlfind ocamlopt -o $@ $< || ocamlfind ocamlc -o $@ $< || true
    $(RM) setup.cmi setup.cmo setup.cmx setup.o

.PHONY: build doc test all install uninstall reinstall clean distclean configure

# OASIS_STOP

wikidoc: $(SETUP) setup.data build
    ./$(SETUP) -build tyxml-api.wikidocdir/index.wiki

And indeed, i don't have any "setup.exe" in the directory. May be we should stay with the solution given by Drup? It works and it has been committed in the repository. So i think it will be ok for the next releases.

@Drup
Copy link
Member

Drup commented Nov 2, 2014

@slegrand45 The solution I implemented is a local workaround. @jpdeplaix is trying to fix oasis, which was use to generate the faulty makefile. ;)

(and uses you as FreeBSD guinea pig :p)

@slegrand45
Copy link
Contributor Author

Ah, ok. I didn't understand that. Sorry. So i'm volunteer to test any other suggestion proposed by @jpdeplaix :)

@slegrand45
Copy link
Contributor Author

The problem comes from the automatic variable "$<". This variable is empty when the configure script runs. So the setup.exe is never built. If i replace this variable by "setup.ml" in the Makefile, that works:

# OASIS_START
# DO NOT EDIT (digest: 46f8bd9984975bd4727bed22d0876cd2)

SETUP = setup.exe
RM = rm -f

build: setup.data $(SETUP)
    ./$(SETUP) -build $(BUILDFLAGS)

doc: setup.data $(SETUP) build
    ./$(SETUP) -doc $(DOCFLAGS)

test: setup.data $(SETUP) build
    ./$(SETUP) -test $(TESTFLAGS)

all: $(SETUP)
    ./$(SETUP) -all $(ALLFLAGS)

install: setup.data $(SETUP)
    ./$(SETUP) -install $(INSTALLFLAGS)

uninstall: setup.data $(SETUP)
    ./$(SETUP) -uninstall $(UNINSTALLFLAGS)

reinstall: setup.data $(SETUP)
    ./$(SETUP) -reinstall $(REINSTALLFLAGS)

clean: $(SETUP)
    ./$(SETUP) -clean $(CLEANFLAGS)

distclean: $(SETUP)
    ./$(SETUP) -distclean $(DISTCLEANFLAGS)
    $(RM) ./$(SETUP)

setup.data: $(SETUP)
    ./$(SETUP) -configure $(CONFIGUREFLAGS)

configure: $(SETUP)
    ./$(SETUP) -configure $(CONFIGUREFLAGS)

setup.exe: setup.ml
    ocamlfind ocamlopt -o $@ setup.ml || ocamlfind ocamlc -o $@ setup.ml || true
    $(RM) setup.cmi setup.cmo setup.cmx setup.o

.PHONY: build doc test all install uninstall reinstall clean distclean configure

# OASIS_STOP

wikidoc: $(SETUP) setup.data build
    ./$(SETUP) -build tyxml-api.wikidocdir/index.wiki

@kit-ty-kate
Copy link
Member

Yes obviously. I know where does it comes from. I don't have much time to fix it properly today. I'll do it tuesday. Thanks anyway.

@slegrand45
Copy link
Contributor Author

Ok. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants