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: update to 2.3.0 #27076

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

kit-ty-kate
Copy link
Contributor

Description

Type(s)
  • bugfix
  • enhancement
  • security fix
Tested on

macOS x.y
Xcode x.y / Command Line Tools x.y.z

Verification

Have you

  • followed our Commit Message Guidelines?
  • squashed and minimized your commits?
  • checked that there aren't other open pull requests for the same change?
  • referenced existing tickets on Trac with full URL in commit message?
  • checked your Portfile with port lint?
  • tried existing tests with sudo port test?
  • tried a full install with sudo port -vst install?
  • tested basic functionality of all binary files?
  • checked that the Portfile's most important variants haven't been broken?

@macportsbot
Copy link

Notifying maintainers:
@pmetzger for port opam.

@barracuda156
Copy link
Contributor

barracuda156 commented Dec 14, 2024

It fails to build:

--->  Building opam
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_ocaml_opam/opam/work/opam-full-2.3.0" && /usr/bin/make -w all 
make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_ocaml_opam/opam/work/opam-full-2.3.0'
dune build --profile=release --root .  --promote-install-files -- opam-installer.install opam.install
File "src/core/dune", line 13, characters 11-21:
13 |     (names opam_stubs)
                ^^^^^^^^^^
src/core/opamCommonStubs.c: In function 'opam_is_executable':
src/core/opamCommonStubs.c:55:9: error: implicit declaration of function 'faccessat'; did you mean 'access'? [-Wimplicit-function-declaration]
src/core/opamCommonStubs.c:55:19: error: 'AT_FDCWD' undeclared (first use in this function)
src/core/opamCommonStubs.c:55:19: note: each undeclared identifier is reported only once for each function it appears in
src/core/opamCommonStubs.c:55:38: error: 'AT_EACCESS' undeclared (first use in this function)

UPD. These are missing prior to macOS 10.10. Possibly adding legacysupport will work: https://github.com/macports/macports-legacy-support (as long as nothing else got broken).

ocaml/opam/Portfile Outdated Show resolved Hide resolved
@barracuda156
Copy link
Contributor

barracuda156 commented Dec 14, 2024

@kit-ty-kate If you prefer going with legacysupport, the build system should pass an ldflag for it. Otherwise linking fails:

--->  Building opam
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_ocaml_opam/opam/work/opam-full-2.3.0" && /usr/bin/make -w all 
make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_ocaml_opam/opam/work/opam-full-2.3.0'
dune build --profile=release --root .  --promote-install-files -- opam-installer.install opam.install
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
File "src/tools/dune", line 28, characters 15-29:
28 |   (name        opam_installer)
                    ^^^^^^^^^^^^^^
Undefined symbols:
  "_faccessat", referenced from:
      _opam_is_executable in libopam_core_stubs.a(opam_stubs.o)
ld: symbol(s) not found
collect2: error: ld returned 1 exit status
File "_none_", line 1:
Error: Error while building custom runtime system
^Cmake: *** [build-opam] Error 130

It is supposed to “just work”, but here the build system seems to ignore ldflags which MacPorts passes. Linking stage should use -lMacportLegacySupport, then it hopefully gonna compile fine.

@kit-ty-kate
Copy link
Contributor Author

I figured out how to stop macports from trying to build on such old systems. It is much easier this way.

Copy link
Contributor

@barracuda156 barracuda156 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove known_fail, it is a fixable problem.

I will make a patch soon.

build.env-append \
DUNE_CONFIG__COPY_FILE=portable
if {${os.platform} eq "darwin" && ${os.major} < 14} {
known_fail yes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, no, this is not something acceptable.

Let me find how Opam passes linker flags, and I will make a patch.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you wish. I do not personally have more time to spend on this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think there is a pressing need to update opam this very moment and break it for several systems. 2.2.0 has been working fine so far, AFAIK.

@barracuda156
Copy link
Contributor

@kit-ty-kate Could you please borrow the correct fix from here? barracuda156@58ec27f
This builds now.

Co-authored-by: Sergey Fedorov <[email protected]>
@kit-ty-kate
Copy link
Contributor Author

@kit-ty-kate Could you please borrow the correct fix from here? barracuda156@58ec27f This builds now.

done. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintainer: open Affects an openmaintainer port type: update
Development

Successfully merging this pull request may close these issues.

4 participants