Opened 4 years ago

Closed 4 years ago

#61554 closed defect (fixed)

global @6.6.4: error: implicit declaration of function 'realpath' is invalid in C99

Reported by: andyturk (Andy Turk) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: catalina bigsur Cc:
Port: global

Description

$ sudo port install global
--->  Computing dependencies for global
--->  Fetching archive for global
--->  Attempting to fetch global-6.6.4_1.darwin_19.x86_64.tbz2 from https://packages.macports.org/global
--->  Attempting to fetch global-6.6.4_1.darwin_19.x86_64.tbz2 from https://ywg.ca.packages.macports.org/mirror/macports/packages/global/global
--->  Attempting to fetch global-6.6.4_1.darwin_19.x86_64.tbz2 from https://kmq.jp.packages.macports.org/global
--->  Configuring global
Error: Failed to configure global, consult /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_global/global/work/global-6.6.4/config.log
Error: Failed to configure global: configure failure: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_global/global/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port global failed

This was on a fresh install of macports on a machine running macOS 10.15.7

Attachments (2)

config.log (92.0 KB) - added by andyturk (Andy Turk) 4 years ago.
config.log file from broken gnu global
main.log (108.8 KB) - added by andyturk (Andy Turk) 4 years ago.
main.log

Download all attachments as: .zip

Change History (7)

Changed 4 years ago by andyturk (Andy Turk)

Attachment: config.log added

config.log file from broken gnu global

Changed 4 years ago by andyturk (Andy Turk)

Attachment: main.log added

main.log

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

Port: global added

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

conftest.c:59:15: error: implicit declaration of function 'realpath' is invalid in C99 [-Werror,-Wimplicit-function-declaration]

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

Keywords: catalina bigsur added
Summary: Failed to configure global (gnu global)global @6.6.4: error: implicit declaration of function 'realpath' is invalid in C99

comment:4 Changed 4 years ago by xdxu

I manually applied the following patch and build passed.

--- configure.orig	2019-12-24 04:13:29.000000000 -0800
+++ configure	2020-11-21 10:30:57.000000000 -0800
@@ -14286,6 +14286,7 @@
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#include <stdlib.h>

 main(){ (void)realpath("/./tmp", (void *)0); return 0; }

Hope it helps.

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

Owner: set to ryandesign
Resolution: fixed
Status: newclosed

In 0397559f8ffbc5c6358d2eddc71adc09baf098ea/macports-ports (master):

global: Fix implicit declaration of function

Closes: #61554
Closes: https://github.com/macports/macports-ports/pull/9172

Note: See TracTickets for help on using tickets.