Opened 18 months ago
Closed 18 months ago
#66221 closed defect (fixed)
mongo-c-driver @1.23.1: error: implicit declaration of function 'getpagesize' is invalid in C99
Reported by: | ConnectGrid | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | arm64 | Cc: | |
Port: | mongo-c-driver |
Description
Been unable to build mongo-c-driver on M1 running Monterey 12.6.1 for the past two weeks. Seems a followup release continues to have the same issue.
Not quite sure which part of the build log to share. Here's the tail end.
info:build Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_mongo-c-driver/mongo-c-driver/work/build" && /usr/bin/make -j8 -w all VERBOSE=ON :info:build Exit code: 2 :error:build Failed to build mongo-c-driver: command execution failed :debug:build Error code: CHILDSTATUS 29870 2 :debug:build Backtrace: command execution failed :debug:build while executing :debug:build "system {*}$notty {*}$callback {*}$nice $fullcmdstring" :debug:build invoked from within :debug:build "command_exec -callback portprogress::target_progress_callback build" :debug:build (procedure "portbuild::build_main" line 8) :debug:build invoked from within :debug:build "$procedure $targetname"
Can't find any other reports of this online. Attempted to clean and rebuild several times, but always failing.
Attachments (1)
Change History (6)
comment:1 Changed 18 months ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | monterey added |
---|---|
Owner: | set to ryandesign |
Status: | new → assigned |
Summary: | Failing to build on macOS 12.6.1 → mongo-c-driver: Failing to build on macOS 12.6.1 |
Changed 18 months ago by ConnectGrid
comment:2 Changed 18 months ago by ConnectGrid
Anything helpful in the logs? I'm surprised that I can't find any similar reports online. Surely others have experienced the same issue? Is it limited to Monterey and Ventura doesn't have the same issue?
I have noticed that the MongoDB team is behind on their support of some newer systems, such as Ubuntu 22.04 LTS, which is still not officially supported six months later.
comment:3 Changed 18 months ago by ConnectGrid
The first error generated:
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_mongo-c-driver/mongo-c-driver/work/mongo-c-driver-1.23.1/src/libmongoc/src/mongoc/mongoc-counters.c:114:21: error: implicit declaration of function 'getpagesize' is invalid in C99 [-Werror,-Wimplicit-function-declaration] :info:build return BSON_MAX (getpagesize (), size); :info:build ^ :info:build 1 error generated.
seems to be related to getpagesize()
being deprecated and the PAGE_SIZE
macro should be used instead.
References:
- https://github.com/giampaolo/psutil/issues/1791
- https://github.com/giampaolo/psutil/issues/1906
- https://github.com/giampaolo/psutil/pull/1907/commits/6014b500c0f8987aaf50bfa02bae8e0d8a13e621
Is this a bug with MongoDB itself, or can it be fixed in the Portfile?
comment:4 Changed 18 months ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | arm64 added; monterey removed |
---|---|
Status: | assigned → accepted |
Summary: | mongo-c-driver: Failing to build on macOS 12.6.1 → mongo-c-driver @1.23.1: error: implicit declaration of function 'getpagesize' is invalid in C99 |
We see the same error: implicit declaration of function 'getpagesize' is invalid in C99
problem on our Apple Silicon build machines running macOS Big Sur and Monterey. We don't see the problem on the Intel build machines running Catalina, Big Sur or Monterey.
It's a bug in mongo-c-driver. They will release the fix in version 1.23.2. I'll add that as a patch to the portfile shortly.
comment:5 Changed 18 months ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Please attach the entire main.log; the relevant error is before the portion you posted.