Opened 2 years ago

Closed 2 years ago

#66403 closed defect (fixed)

Upgrading libbson on MAC OSX 13.0.1 fails

Reported by: sudheerhebbale (Sudheer Hebbale) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: libbson

Description (last modified by ryandesign (Ryan Carsten Schmidt))

While upgrading libbson on MAC OSX 13.0.1

The following error gets generated in main.log

:info:build ccache: error: Failed to create directory /opt/local/var/macports/build/.ccache/tmp: Operation not permitted

main.log is attached for reference

Tried with configureccache set to no as well, resulting in the same error

Attachments (2)

main.log (242.7 KB) - added by sudheerhebbale (Sudheer Hebbale) 2 years ago.
main.2.log (52.9 KB) - added by sudheerhebbale (Sudheer Hebbale) 2 years ago.

Download all attachments as: .zip

Change History (15)

Changed 2 years ago by sudheerhebbale (Sudheer Hebbale)

Attachment: main.log added

comment:1 Changed 2 years ago by sudheerhebbale (Sudheer Hebbale)

Description: modified (diff)

comment:2 Changed 2 years ago by jmroot (Joshua Root)

Keywords: ccache removed
Owner: set to ryandesign
Status: newassigned

The cmake portgroup does some very strange things with the configure.ccache option that are probably causing this.

comment:3 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)

Hmm, I always build with configureccache yes on my main machine and I don't recall seeing this problem with libbson, and our buildbot machines build with configureccache no and I don't think I've seen it there either. However, I haven't tried Ventura yet; maybe something has changed.

Are the permissions and ownership of /opt/local/var/macports/build and /opt/local/var/macports/build/.ccache and /opt/local/var/macports/build/.ccache/tmp correct? On my system I have:

$ ls -ld /opt/local/var/macports/build{,/.ccache{,/tmp}}
drwxr-xr-x  61 root      wheel  1952 Dec  4 09:05 /opt/local/var/macports/build
drwxr-xr-x  20 macports  wheel   640 Dec  4 08:44 /opt/local/var/macports/build/.ccache
drwxr-xr-x   4 macports  wheel   128 Dec  4 08:49 /opt/local/var/macports/build/.ccache/tmp

Based on the error message I presume /opt/local/var/macports/build/.ccache/tmp does not yet exist on your system. Has this worked for you before? Does it work with other ports?

comment:4 Changed 2 years ago by sudheerhebbale (Sudheer Hebbale)

Permissions in /opt/local/var/macports/build are correct, all files are owned by root:wheel

As such I have run the port command with sudo.

Below is the list of files in /opt/local/var/macports

drwxr-xr-x   25 root      wheel    800 Dec  6 10:28 build
drwxr-xr-x  316 root      wheel  10112 Dec  6 10:21 distfiles
drwxr-xr-x    3 root      wheel     96 Jan  1  2021 home
drwxr-xr-x    3 macports  wheel     96 Dec  6 10:30 incoming
drwxr-xr-x   30 root      wheel    960 Dec  6 10:21 logs
-rw-r--r--    1 root      wheel   1477 Dec  6 10:30 pingtimes
drwxr-xr-x    9 root      wheel    288 Nov 15 10:11 registry
drwxrwxrwt    3 root      wheel     96 Nov 15 10:11 sip-workaround
drwxr-xr-x  462 root      wheel  14784 Nov 22 09:59 software
drwxr-xr-x    3 root      wheel     96 Sep 25  2017 sources
Last edited 2 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:5 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

Ok, I do see a similar problem...

ccache: error: Failed to create temporary file for /opt/local/var/macports/build/.ccache/tmp/inode-cache-64.v1.tmp.5fCn6l.tmp: Operation not permitted

...if I build with configureccache=no but with the ccache port still installed.

I see in the log...

:info:configure -- Compiling with CCache enabled. Disable by setting MONGO_USE_CCACHE to OFF

...so this build system has special code for finding ccache, which I should disable.

comment:6 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

In dc49b02703c39d8e5ca9bd6414e7b38ccfc6d67d/macports-ports (master):

mongo-c-driver: Set MONGO_USE_CCACHE=OFF

MacPorts will still use ccache if so configured in macports.conf.

See: #66403

comment:7 Changed 2 years ago by sudheerhebbale (Sudheer Hebbale)

Still experiencing the same problem after setting configureccache no

I guess it will take some time for the changes to reflect in all distributions

Will try after some time and update

comment:8 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

It typically takes about an hour for a change to propagate from git to rsync, so by now you should be able to sudo port selfupdate to receive the fix. Let me know if it helps.

Changed 2 years ago by sudheerhebbale (Sudheer Hebbale)

Attachment: main.2.log added

comment:9 Changed 2 years ago by sudheerhebbale (Sudheer Hebbale)

The same issue seems to be there.

I ran this as root user as well (instead of running port with sudo), resulting in the same status

comment:10 Changed 2 years ago by sudheerhebbale (Sudheer Hebbale)

This time created the directory /opt/local/var/macports/build/.ccache/tmp with 777 permission and ran the sudo port command

Resulting in inability to create directories within, such as

:info:build ccache: error: Failed to create temporary file for /opt/local/var/macports/build/.ccache/tmp/inode-cache-64.v1.tmp.H0w9vh.    tmp: Operation not permitted
:info:build ccache: error: Failed to create temporary file for /opt/local/var/macports/build/.ccache/tmp/inode-cache-64.v1.tmp.fmLNwf.    tmp: Operation not permitted
Last edited 2 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:11 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

According to your log, you're not yet using the fixed version of the portfile. (-DMONGO_USE_CCACHE=OFF doesn't appear in the log.)

Did you run sudo port selfupdate? If so, is it actually syncing your ports? If you run sudo port -d selfupdate is there some error message?

comment:12 Changed 2 years ago by sudheerhebbale (Sudheer Hebbale)

Post sudo port selfupdate, build and deploy of libbson went through

Thanks

Now while compiling broken dependencies some of the other ports are failing (e.g. xalanc) :-) Will follow that up with separate tickets

comment:13 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.