Opened 2 months ago

Closed 3 weeks ago

#66365 closed defect (fixed)

libgcc-devel @12-20221202 build failure: sprintf is deprecated [-Werror=deprecated-declarations]

Reported by: slackero (Oliver Georgi) Owned by: kencu (Ken)
Priority: Normal Milestone:
Component: ports Version: 2.8.0
Keywords: ventura arm64 Cc: michaellass (Michael Lass), abey79 (Antoine Beyeler)
Port: gcc-devel libgcc-devel

Description

Happens with update/upgrade and also reinstall after uninstall

--->  Computing dependencies for libgcc-devel
--->  Fetching archive for libgcc-devel
--->  Attempting to fetch libgcc-devel-12-20221126_0+stdlib_flag.darwin_22.arm64.tbz2 from https://fra.de.packages.macports.org/libgcc-devel
--->  Attempting to fetch libgcc-devel-12-20221126_0+stdlib_flag.darwin_22.arm64.tbz2 from https://packages.macports.org/libgcc-devel
--->  Attempting to fetch libgcc-devel-12-20221126_0+stdlib_flag.darwin_22.arm64.tbz2 from https://nue.de.packages.macports.org/libgcc-devel
--->  Fetching distfiles for libgcc-devel
--->  Attempting to fetch gcc-darwin-arm64-31e39275410a7a83f18e344a332bf5812f759a5e.tar.gz from https://codeload.github.com/iains/gcc-darwin-arm64/legacy.tar.gz/31e39275410a7a83f18e344a332bf5812f759a5e?dummy=
--->  Verifying checksums for libgcc-devel                                                   
--->  Extracting libgcc-devel
--->  Configuring libgcc-devel
--->  Building libgcc-devel                              
Error: Failed to build libgcc-devel: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc-devel/libgcc-devel/main.log for details.
Error: Unable to execute port: upgrade libgcc-devel failed

Attachments (2)

main.log.zip (2.3 MB) - added by slackero (Oliver Georgi) 2 months ago.
Install log
ibgcc-devel@12-20221202_0.log.zip (5.8 KB) - added by slackero (Oliver Georgi) 8 weeks ago.
Log ibgcc-devel@12-20221202_0

Change History (14)

Changed 2 months ago by slackero (Oliver Georgi)

Attachment: main.log.zip added

Install log

comment:1 Changed 2 months ago by michaellass (Michael Lass)

Cc: michaellass added

comment:2 Changed 8 weeks ago by VinzenzBildstein (Vinzenz Bildstein)

I found the same issue:

I tried cleaning the port and installing it using "port install libgcc-devel build.jobs=1":

--->  Computing dependencies for libgcc-devel
--->  Fetching archive for libgcc-devel
--->  Attempting to fetch libgcc-devel-12-20221126_0+stdlib_flag.darwin_22.arm64.tbz2 from https://packages.macports.org/libgcc-devel
--->  Attempting to fetch libgcc-devel-12-20221126_0+stdlib_flag.darwin_22.arm64.tbz2 from https://ywg.ca.packages.macports.org/mirror/macports/packages/libgcc-devel
--->  Attempting to fetch libgcc-devel-12-20221126_0+stdlib_flag.darwin_22.arm64.tbz2 from http://mirror.fcix.net/macports/packages/libgcc-devel
--->  Fetching distfiles for libgcc-devel
--->  Attempting to fetch gcc-darwin-arm64-31e39275410a7a83f18e344a332bf5812f759a5e.tar.gz from https://distfiles.macports.org/gcc-devel
--->  Verifying checksums for libgcc-devel                                           
--->  Extracting libgcc-devel
--->  Configuring libgcc-devel
--->  Building libgcc-devel                              
Error: Failed to build libgcc-devel: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc-devel/libgcc-devel/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port libgcc-devel failed
28:~ root# less /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc-devel/libgcc-devel/main.log 
28:~ root# /opt/local/bin/port clean libgcc-devel             
--->  Cleaning libgcc-devel
28:~ root# ls /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc-devel/libgcc-devel/main.log 
ls: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc-devel/libgcc-devel/main.log: No such file or directory
28:~ root# /opt/local/bin/port install libgcc-devel build.jobs=1
--->  Computing dependencies for libgcc-devel
--->  Fetching archive for libgcc-devel
--->  Attempting to fetch libgcc-devel-12-20221126_0+stdlib_flag.darwin_22.arm64.tbz2 from https://packages.macports.org/libgcc-devel
--->  Attempting to fetch libgcc-devel-12-20221126_0+stdlib_flag.darwin_22.arm64.tbz2 from https://ywg.ca.packages.macports.org/mirror/macports/packages/libgcc-devel
--->  Attempting to fetch libgcc-devel-12-20221126_0+stdlib_flag.darwin_22.arm64.tbz2 from http://mirror.fcix.net/macports/packages/libgcc-devel
--->  Fetching distfiles for libgcc-devel
--->  Verifying checksums for libgcc-devel
--->  Extracting libgcc-devel
--->  Configuring libgcc-devel
--->  Building libgcc-devel                              
Error: Failed to build libgcc-devel: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc-devel/libgcc-devel/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port libgcc-devel failed

The error from main.log is

:info:build make[3]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc-devel/libgcc-devel/work/build/libcpp'
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc-devel/libgcc-devel/work/build/./prev-gcc/xg++ -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc-devel/libgcc-devel/work/build/./prev-gcc/ -B/opt/local/arm64-apple-darwin22/bin/ -nostdinc++ -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc-devel/libgcc-devel/work/build/prev-arm64-apple-darwin22/libstdc++-v3/src/.libs -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc-devel/libgcc-devel/work/build/prev-arm64-apple-darwin22/libstdc++-v3/libsupc++/.libs  -isystem /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc-devel/libgcc-devel/work/build/prev-arm64-apple-darwin22/libstdc++-v3/include/arm64-apple-darwin22  -isystem /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc-devel/libgcc-devel/work/build/prev-arm64-apple-darwin22/libstdc++-v3/include  -isystem /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc-devel/libgcc-devel/work/gcc-darwin-arm64-31e39275410a7a83f18e344a332bf5812f759a5e/libstdc++-v3/libsupc++ -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc-devel/libgcc-devel/work/build/prev-arm64-apple-darwin22/libstdc++-v3/src/.libs -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc-devel/libgcc-devel/work/build/prev-arm64-apple-darwin22/libstdc++-v3/libsupc++/.libs  -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc-devel/libgcc-devel/work/gcc-darwin-arm64-31e39275410a7a83f18e344a332bf5812f759a5e/libcpp -I. -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc-devel/libgcc-devel/work/gcc-darwin-arm64-31e39275410a7a83f18e344a332bf5812f759a5e/libcpp/../include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc-devel/libgcc-devel/work/gcc-darwin-arm64-31e39275410a7a83f18e344a332bf5812f759a5e/libcpp/include -I/opt/local/include -g -O2 -fno-checking -gtoggle -W -Wall -Wno-narrowing -Wwrite-strings -Wmissing-format-attribute -pedantic -Wno-long-long -Werror -fno-exceptions -fno-rtti -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc-devel/libgcc-devel/work/gcc-darwin-arm64-31e39275410a7a83f18e344a332bf5812f759a5e/libcpp -I. -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc-devel/libgcc-devel/work/gcc-darwin-arm64-31e39275410a7a83f18e344a332bf5812f759a5e/libcpp/../include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc-devel/libgcc-devel/work/gcc-darwin-arm64-31e39275410a7a83f18e344a332bf5812f759a5e/libcpp/include -I/opt/local/include -fPIC  -c -o charset.o -MT charset.o -MMD -MP -MF .deps/charset.Tpo /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc-devel/libgcc-devel/work/gcc-darwin-arm64-31e39275410a7a83f18e344a332bf5812f759a5e/libcpp/charset.cc
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc-devel/libgcc-devel/work/gcc-darwin-arm64-31e39275410a7a83f18e344a332bf5812f759a5e/libcpp/charset.cc: In function 'const uchar* convert_escape(cpp_reader*, const uchar*, const uchar*, _cpp_strbuf*, cset_converter, cpp_string_location_reader*, cpp_substring_ranges*)':
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc-devel/libgcc-devel/work/gcc-darwin-arm64-31e39275410a7a83f18e344a332bf5812f759a5e/libcpp/charset.cc:2207:18: error: 'int sprintf(char*, const char*, ...)' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Werror=deprecated-declarations]
:info:build  2207 |           sprintf(buf, "%03o", (int) c);
:info:build       |           ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
:info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc-devel/libgcc-devel/work/gcc-darwin-arm64-31e39275410a7a83f18e344a332bf5812f759a5e/libcpp/system.h:38,
:info:build                  from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc-devel/libgcc-devel/work/gcc-darwin-arm64-31e39275410a7a83f18e344a332bf5812f759a5e/libcpp/charset.cc:21:
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc-devel/libgcc-devel/work/build/prev-gcc/include-fixed/stdio.h:204:10: note: declared here
:info:build   204 | int      sprintf(char * __restrict, const char * __restrict, ...) __printflike(2, 3);
:info:build       |          ^~~~~~~
:info:build cc1plus: all warnings being treated as errors
:info:build make[3]: *** [charset.o] Error 1
:info:build make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc-devel/libgcc-devel/work/build/libcpp'
:info:build make[2]: *** [all-stage2-libcpp] Error 2
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc-devel/libgcc-devel/work/build'
:info:build make[1]: *** [stage2-bubble] Error 2
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc-devel/libgcc-devel/work/build'
:info:build make: *** [bootstrap-lean] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc-devel/libgcc-devel/work/build'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc-devel/libgcc-devel/work/build" && /usr/bin/make -j1 -w bootstrap-lean 
:info:build Exit code: 2
:error:build Failed to build libgcc-devel: command execution failed
:debug:build Error code: CHILDSTATUS 77900 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"
:error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc-devel/libgcc-devel/main.log for details.

comment:3 Changed 8 weeks ago by VinzenzBildstein (Vinzenz Bildstein)

Also, since this ticket is attributed to the port "gcc-devel" it does not show up when trying to search for issues with the port "libgcc-devel". I don't know if it's possible to change this easily.

comment:4 Changed 8 weeks ago by slackero (Oliver Georgi)

Port: libgcc-devel added; gcc-devel removed

Changed 8 weeks ago by slackero (Oliver Georgi)

Log ibgcc-devel@12-20221202_0

comment:5 Changed 8 weeks ago by slackero (Oliver Georgi)

The build of the updated version libgcc-devel @12-20221202_0+stdlib_flag also fails. The log file is attached.

:debug:main Starting logging for libgcc-devel @12-20221202_0+stdlib_flag
:debug:sysinfo macOS 13.0.1 (darwin/22.1.0) arch arm
:debug:sysinfo MacPorts 2.8.0
:debug:sysinfo Xcode 14.1, CLT 14.1.0.0.1.1666437224
:debug:sysinfo SDK 13
:debug:sysinfo MACOSX_DEPLOYMENT_TARGET: 13.0
...
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_gcc-devel/libgcc-devel/work/build" && /usr/bin/make -j10 -w bootstrap-lean 
:info:build Exit code: 2
:error:build Failed to build libgcc-devel: command execution failed
:debug:build Error code: CHILDSTATUS 67670 2

comment:6 Changed 7 weeks ago by slackero (Oliver Georgi)

Just to be more clear with this ticket: This bug reports is related to the Apple Silicon platform. The current Portfile differs between Intel (v13-20221204) and Arm (v12-20221202). If you check https://ports.macports.org/port/libgcc-devel/ you see v13-20221204 but on Arm it uses v12-20221202 only which is related to the commit https://github.com/iains/gcc-darwin-arm64/commit/d679055c574a09f11b860dfa596917919124120a.

comment:7 Changed 7 weeks ago by slackero (Oliver Georgi)

Summary: Failed to build libgcc-devel: command execution failedFailed to build libgcc-devel: command execution failed @12-20221202 gcc-darwin-arm64

comment:8 Changed 7 weeks ago by slackero (Oliver Georgi)

Summary: Failed to build libgcc-devel: command execution failed @12-20221202 gcc-darwin-arm64libgcc-devel @12-20221202: Failed to build libgcc-devel: command execution failed (gcc-darwin-arm64)

comment:9 Changed 5 weeks ago by jmroot (Joshua Root)

Port: gcc-devel added

comment:10 Changed 5 weeks ago by jmroot (Joshua Root)

Summary: libgcc-devel @12-20221202: Failed to build libgcc-devel: command execution failed (gcc-darwin-arm64)libgcc-devel @12-20221202 build failure: sprintf is deprecated [-Werror=deprecated-declarations]

comment:11 Changed 4 weeks ago by abey79 (Antoine Beyeler)

Cc: abey79 added

comment:12 Changed 3 weeks ago by kencu (Ken)

Owner: set to kencu
Resolution: fixed
Status: newclosed

In 1a33245afdb296fb6b03ea995926967b009227b2/macports-ports (master):

gcc-devel: build build with newer SDKS

currently this applies only to @iains 's arm fork
this fix will eventually be rolled into iain's fork
and then upstreamed at some point

closes: #66365

Note: See TracTickets for help on using tickets.