Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#61754 closed defect (fixed)

graphviz-gui @2.40.1: error: implicit declaration of function 'sysctlbyname' is invalid in C99

Reported by: jptrainor (Jim Trainor) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: bigsur catalina Cc:
Port: graphviz-gui

Description

"port install graphviz-gui" fails on MacOS 11.0.1 with Xcode 12.2.

Attachments (1)

main.log (335.6 KB) - added by jptrainor (Jim Trainor) 3 years ago.
install log file

Download all attachments as: .zip

Change History (9)

Changed 3 years ago by jptrainor (Jim Trainor)

Attachment: main.log added

install log file

comment:1 Changed 3 years ago by jmroot (Joshua Root)

Owner: set to ryandesign
Status: newassigned

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

Keywords: bigsur catalina added
Status: assignedaccepted
Summary: graphviz-gui@2.40.1: MacOS 11.0.1 install failsgraphviz-gui @2.40.1: error: implicit declaration of function 'sysctlbyname' is invalid in C99

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

Resolution: fixed
Status: acceptedclosed

In 9147e522801aefd1cba1a8555e5a8fa6035eebdf/macports-ports (master):

graphviz-gui{,-devel}: Always call [super dealloc]

Fixes build failure due to implicit declaration of sysctlbyname.

Closes: #61754

comment:4 Changed 3 years ago by jptrainor (Jim Trainor)

Resolution: fixed
Status: closedreopened

It's still failing. See the original log. It's the same error (see the log attached to the initial bug report). This is the error:

:info:build     builtin-productPackagingUtility -entitlements -format xml -o
/Volumes/ExtStorage/local/var/macports/build/_Volumes_ExtStorage_local_var_macports_sources_rsync.macports.org_macports_releas\
e_tarballs_ports_graphics_graphviz/graphviz-gui/work/graphviz-2.40.1/macosx/build/graphviz.build/Release/application.build/Gra\
phviz.app.xcent
:info:build error: could not write entitlements file: Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to
save the file “Graphviz.app.xcent” in the folder “application.build”."
UserInfo={NSURL=file:///Volumes/ExtStorage/local/var/macports/build/_Volumes_ExtStorage_local_var_macports_sources_rsync.macpo\
rts.org_macports_release_tarballs_ports_graphics_graphviz/graphviz-gui/work/graphviz-2.40.1/macosx/build/graphviz.build/Releas\
e/application.build/Graphviz.app.xcent, NSUserStringVariant=Folder, NSUnderlyingError=0x7ff0483499a0 {Error
Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}}
:info:build ** BUILD FAILED **
:info:build The following build commands failed:
:info:build     ProcessProductPackaging "" build/graphviz.build/Release/application.build/Graphviz.app.xcent
:info:build (1 failure)
:info:build Command failed: cd

I haven't seen any build errors with any other of the ports that I have installed so I don't think this is a generic permission issue.

comment:5 Changed 3 years ago by kencu (Ken)

Resolution: fixed
Status: reopenedclosed

Your error is something totally different, some kind of permissions error with your external build volume.

Please open a new ticket for that.

comment:6 Changed 3 years ago by kencu (Ken)

I know you won't think so -- here is your first error (fixed by this ticket):

3341    :info:build /Volumes/ExtStorage/local/var/macports/build/_Volumes_ExtStorage_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_graphviz/graphviz-gui/work/graphviz-2.40.1/macosx/GVWindowController.m:122:5: error: implicit declaration of function 'sysctlbyname' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
3342	:info:build     sysctlbyname("kern.osrelease", darwinStr, &size, NULL, 0);
3343	:info:build     ^

comment:7 Changed 3 years ago by jptrainor (Jim Trainor)

Executing the failed command (cut from the log) and executing it manually (without sudo) works, then re-executing the install succeeds. The cause of this is some sort of security problem that is unique to MacOS 11.

Here is exactly what I did. It's repeatable on my system.

# fresh install fails
$ sudo port install graphviz-gui

# execute the failed command (cut from the log), this succeeds
$ cd "/Volumes/ExtStorage/local/var/macports/build/_Volumes_ExtStorage_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_graphviz/graphviz-gui/work/graphviz-2.40.1/macosx" && /usr/bin/xcodebuild -UseNewBuildSystem=NO  -alltargets -configuration Release build INSTALL_PATH=/Applications/MacPorts  OBJROOT="/Volumes/ExtStorage/local/var/macports/build/_Volumes_ExtStorage_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_graphviz/graphviz-gui/work/graphviz-2.40.1/macosx/build/" SYMROOT="/Volumes/ExtStorage/local/var/macports/build/_Volumes_ExtStorage_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_graphviz/graphviz-gui/work/graphviz-2.40.1/macosx/build/" MACOSX_DEPLOYMENT_TARGET=11.0 ARCHS=x86_64 SDKROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk" GCC_VERSION=com.apple.compilers.llvm.clang.1_0 CLANG_CXX_LIBRARY="libc++" PREFIX=/opt/local

# change out of the directory that the above command leaves the shell in
$ cd

# re-execute the install, this succeeds
$ sudo port install graphviz-gui

comment:8 in reply to:  6 Changed 3 years ago by jptrainor (Jim Trainor)

Yes, you're right. My error. I'll file the second issue as a new bug. Thanks.

Replying to kencu:

I know you won't think so -- here is your first error (fixed by this ticket):

3341    :info:build /Volumes/ExtStorage/local/var/macports/build/_Volumes_ExtStorage_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_graphviz/graphviz-gui/work/graphviz-2.40.1/macosx/GVWindowController.m:122:5: error: implicit declaration of function 'sysctlbyname' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
3342	:info:build     sysctlbyname("kern.osrelease", darwinStr, &size, NULL, 0);
3343	:info:build     ^
Note: See TracTickets for help on using tickets.