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

Make setup fails due to "invalid extra arguments" to opam switch create #1133

Closed
WernerDrasche opened this issue Aug 7, 2023 · 5 comments · May be fixed by #1137
Closed

Make setup fails due to "invalid extra arguments" to opam switch create #1133

WernerDrasche opened this issue Aug 7, 2023 · 5 comments · May be fixed by #1137
Assignees
Labels
bug setup Dependencies, CI, releasing
Milestone

Comments

@WernerDrasche
Copy link

WernerDrasche commented Aug 7, 2023

This happens when one runs make setup:

  • opam switch -y create . --deps-only ocaml-variants.4.14.0+options ocaml-option-flambda --locked
    [ERROR] Invalid extra arguments ocaml-variants.4.14.0+options ocaml-option-flambda
    gmake: *** [Makefile:4: setup] Error 2

opam version: 2.0.8
ocaml version: 5.0.0
OS: openbsd

@sim642 sim642 added bug setup Dependencies, CI, releasing labels Aug 7, 2023
@sim642
Copy link
Member

sim642 commented Aug 7, 2023

I suspect opam 2.1 is needed to create flambda switches like that.

@sim642 sim642 self-assigned this Aug 10, 2023
@michael-schwarz
Copy link
Member

@WernerDrasche does a switch to opam >= 2.1 help here?

@WernerDrasche
Copy link
Author

opam switch -y create . --deps-only --packages=ocaml-variants.4.14.0+options,ocaml-option-flambda --locked in build.sh fixes it. But it still doesn't compile because some dependencies fail to compile. I have given up after a few days of experimenting.

@sim642 sim642 linked a pull request Aug 21, 2023 that will close this issue
1 task
@sim642
Copy link
Member

sim642 commented Aug 21, 2023

I've included a fix with --packages for this in #1137.

@sim642 sim642 added this to the v2.2.0 milestone Aug 21, 2023
@WernerDrasche
Copy link
Author

WernerDrasche commented Aug 21, 2023

Theese are the compilation errors:

#=== ERROR while compiling sha.1.15.2 =========================================#
# context     2.0.8 | openbsd/x86_64 | ocaml-option-flambda.1 ocaml-variants.4.14.0+options | https://opam.ocaml.org#33168d94
# path        ~/build/analyzer/_opam/.opam-switch/build/sha.1.15.2
# command     ~/build/analyzer/_opam/bin/dune build -p sha -j 1 --promote-install-files=false @install
# exit-code   1
# env-file    ~/.opam/log/sha-45962-6f0b34.env
# output-file ~/.opam/log/sha-45962-6f0b34.out
### output ###
# 18 |   (names sha1_stubs sha256_stubs sha512_stubs)))
# [...]
# (cd _build/default && /usr/bin/cc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -D_FILE_OFFSET_BITS=64 -Wall -O3 -funroll-loops -g -I /home/gandalf/build/analyzer/_opam/lib/ocaml -I /home/gandalf/build/analyzer/_opam/lib/stdlib-shims -o sha512_stubs.o -c sha512_stubs.c)
# In file included from /usr/include/sys/endian.h:41,
#                  from /usr/include/sys/types.h:45,
#                  from /usr/include/unistd.h:39,
#                  from sha512_stubs.c:25:
# bitfn.h:44:28: error: expected declaration specifiers or '...' before '__builtin_constant_p'
#    44 | static inline unsigned int swap32(unsigned int a)
#       |                            ^~~~~~
# bitfn.h:57:24: error: expected declaration specifiers or '...' before '__builtin_constant_p'
#    57 | static inline uint64_t swap64(uint64_t a)
#       |                        ^~~~~~

#=== ERROR while compiling goblint-cil.2.0.1 ==================================#
# context     2.0.8 | openbsd/x86_64 | ocaml-option-flambda.1 ocaml-variants.4.14.0+options | pinned(git+https://github.com/goblint/cil.git#4df989fe625d91ce07d94afe1d85b3b5c6cdd63e#4df989fe)
# path        ~/build/analyzer/_opam/.opam-switch/build/goblint-cil.2.0.1
# command     ~/build/analyzer/_opam/bin/dune build -p goblint-cil -j 1 @install
# exit-code   1
# env-file    ~/.opam/log/goblint-cil-45962-c6659d.env
# output-file ~/.opam/log/goblint-cil-45962-c6659d.out
### output ###
# compiling c program:
# [...]
# run: cc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC  -I /home/gandalf/build/analyzer/_opam/lib/ocaml -o /tmp/build_8367cf_dune/ocaml-configurator8985e0/c-test-24/test.exe /tmp/build_8367cf_dune/ocaml-configurator8985e0/c-test-24/test.c -lm
# -> process exited with code 1
# -> stdout:
# -> stderr:
#  | /tmp/build_8367cf_dune/ocaml-configurator8985e0/c-test-24/test.c:18:1: error: unknown type name 'char32_t'
#  |    18 | char32_t foo(char32_t x) { return x; }
#  |       | ^~~~~~~~
#  | /tmp/build_8367cf_dune/ocaml-configurator8985e0/c-test-24/test.c:18:14: error: unknown type name 'char32_t'
#  |    18 | char32_t foo(char32_t x) { return x; }
#  |       |              ^~~~~~~~
# Fatal error: exception Failure("cannot find definition of char32_t")

#=== ERROR while compiling apron.v0.9.13 ======================================#
# context     2.0.8 | openbsd/x86_64 | ocaml-option-flambda.1 ocaml-variants.4.14.0+options | pinned(git+https://github.com/antoinemine/apron.git#1a8e91062c0d7d1e80333d19d5a432332bbbaec8#1a8e9106)
# path        ~/build/analyzer/_opam/.opam-switch/build/apron.v0.9.13
# command     /usr/local/bin/gmake -j1
# exit-code   2
# env-file    ~/.opam/log/apron-45962-a02972.env
# output-file ~/.opam/log/apron-45962-a02972.out
### output ###
# [...]
# apronxx_test.cc:2887:5: warning: 'HAS_PPL' is not defined, evaluates to 0 [-Wundef]
# #if HAS_PPL
#     ^
# 6 warnings generated.
# c++ -U__STRICT_ANSI__ -UNDEBUG -O0 -g  -Wcast-qual -Wswitch -Wall -Wextra -Wundef -Wcast-align -Wno-unused -Wno-unused-parameter -Wno-unused-function -fPIC -Werror-implicit-function-declaration -Wbad-function-cast -Wstrict-prototypes -std=c99 -o apronxx_test apronxx_test_debug.o -L../newpolka -lpolkaMPQ_debug -L../octagons -loctMPQ_debug -L../box -lboxMPQ_debug -L../taylor1plus -lt1pMPQ_debug[...]
# ld: error: unable to find library -lmpfr
# ld: error: unable to find library -lgmpxx
# ld: error: unable to find library -lgmp
# c++: error: linker command failed with exit code 1 (use -v to see invocation)
# gmake[1]: *** [Makefile:116: apronxx_test] Error 1
# gmake[1]: Leaving directory '/home/gandalf/build/analyzer/_opam/.opam-switch/build/apron.v0.9.13/apronxx'
# gmake: *** [Makefile:36: cxx] Error 2

The last one is funny because I have all these libraries installed.

@sim642 sim642 closed this as completed in ee31392 Sep 12, 2023
FelixKrayer pushed a commit to FelixKrayer/analyzer that referenced this issue Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug setup Dependencies, CI, releasing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants