NetBSD Problem Report #56335

From john@ipi.zia.io  Thu Jul 29 05:36:24 2021
Return-Path: <john@ipi.zia.io>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id C97A11A921F
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 29 Jul 2021 05:36:24 +0000 (UTC)
Message-Id: <20210729014818.BA27BC9FE0B@ipi.zia.io>
Date: Thu, 29 Jul 2021 01:48:18 +0000 (UTC)
From: john@ziaspace.com
Reply-To: john@ziaspace.com
To: gnats-bugs@NetBSD.org
Subject: lang/rust fails on NetBSD/aarch64 with gcc 10.3.0
X-Send-Pr-Version: 3.95

>Number:         56335
>Category:       pkg
>Synopsis:       lang/rust fails on NetBSD/aarch64 with gcc 10.3.0
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jul 29 05:40:00 +0000 2021
>Last-Modified:  Fri Jul 30 07:35:01 +0000 2021
>Originator:     John Klos
>Release:        NetBSD 9.99.87
>Organization:

>Environment:


System: NetBSD ipi.zia.io 9.99.87 NetBSD 9.99.87 (GENERIC64) #0: Tue Jul 27 23:43:08 UTC 2021 john@frigg.zia.io:/usr/current/obj-evbarm/sys/arch/evbarm/compile/GENERIC64 evbarm
Architecture: aarch64
Machine: evbarm
>Description:

I compiled rust a week or so ago on an aarch64 system running 9.99.80 with
gcc 9.3.0 - no problems.

Trying to compile rust on another aarch64 system running 9.99.87 with gcc 10.3.0
fails with:

  running: "gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-O2" "-D_FORTIFY_SOURCE=2" "-I/usr/local/include" "-I/usr/include" "-I/usr/include/krb5" "-I/usr/local/include/python3.8" "-I" "curl/lib" "-I" "curl/include" "-I" "/usr/pkgsrc/lang/rust/work/rustc-1.52.1-src/build/aarch64-unknown-netbsd/stage2-tools/aarch64-unknown-netbsd/release/build/libnghttp2-sys-939bfb82b05e4e2d/out/i/include" "-fvisibility=hidden" "-DBUILDING_LIBCURL" "-DCURL_DISABLE_CRYPTO_AUTH" "-DCURL_DISABLE_DICT" "-DCURL_DISABLE_GOPHER" "-DCURL_DISABLE_IMAP" "-DCURL_DISABLE_LDAP" "-DCURL_DISABLE_LDAPS" "-DCURL_DISABLE_NTLM" "-DCURL_DISABLE_POP3" "-DCURL_DISABLE_RTSP" "-DCURL_DISABLE_SMB" "-DCURL_DISABLE_SMTP" "-DCURL_DISABLE_TELNET" "-DCURL_DISABLE_TFTP" "-DCURL_STATICLIB" "-DENABLE_IPV6" "-DHAVE_ASSERT_H" "-DOS=\"unknown\"" "-DHAVE_ZLIB_H" "-DHAVE_LIBZ" "-DHAVE_GETADDRINFO" "-DHAVE_GETPEERNAME" "-DHAVE_GETSOCKNAME" "-DCURL_DISABLE_FTP" "-DUSE_NGHTT
 P2" "-DNGHTTP2_STATICLIB" "-DUSE_UNIX_SOCKETS" "-DHAVE_SYS_UN_H" "-DUSE_OPENSSL" "-DHAVE_CLOCK_GETTIME_MONOTONIC" "-DHAVE_GETTIMEOFDAY" "-DRECV_TYPE_ARG1=int" "-DHAVE_PTHREAD_H" "-DHAVE_ARPA_INET_H" "-DHAVE_ERRNO_H" "-DHAVE_FCNTL_H" "-DHAVE_NETDB_H" "-DHAVE_NETINET_IN_H" "-DHAVE_POLL_FINE" "-DHAVE_POLL_H" "-DHAVE_FCNTL_O_NONBLOCK" "-DHAVE_SYS_SELECT_H" "-DHAVE_SYS_STAT_H" "-DHAVE_UNISTD_H" "-DHAVE_RECV" "-DHAVE_SELECT" "-DHAVE_SEND" "-DHAVE_SOCKET" "-DHAVE_STERRROR_R" "-DHAVE_SOCKETPAIR" "-DHAVE_STRUCT_TIMEVAL" "-DUSE_THREADS_POSIX" "-DRECV_TYPE_ARG2=void*" "-DRECV_TYPE_ARG3=size_t" "-DRECV_TYPE_ARG4=int" "-DRECV_TYPE_RETV=ssize_t" "-DSEND_QUAL_ARG2=const" "-DSEND_TYPE_ARG1=int" "-DSEND_TYPE_ARG2=void*" "-DSEND_TYPE_ARG3=size_t" "-DSEND_TYPE_ARG4=int" "-DSEND_TYPE_RETV=ssize_t" "-DSIZEOF_CURL_OFF_T=8" "-DSIZEOF_INT=4" "-DSIZEOF_SHORT=2" "-DSIZEOF_SSIZE_T=8" "-DSIZEOF_SIZE_T=8" "-DSIZEOF_LONG=8" "-o" "/usr/pkgsrc/lang/rust/work/rustc-1.52.1-src/build/aarch64-unknown-netbsd/stage2-too
 ls/aarch64-unknown-netbsd/release/build/curl-sys-4535
484fa02b1619/out/build/curl/lib/strerror.o" "-c" "curl/lib/strerror.c"
  cargo:warning=curl/lib/strerror.c: In function 'curl_easy_strerror':
  cargo:warning=curl/lib/strerror.c:191:8: error: 'CURLE_TELNET_OPTION_SYNTAX' undeclared (first use in this function); did you mean 'CURLE_SETOPT_OPTION_SYNTAX'?
  cargo:warning=  191 |   case CURLE_TELNET_OPTION_SYNTAX :
  cargo:warning=      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=      |        CURLE_SETOPT_OPTION_SYNTAX
  cargo:warning=curl/lib/strerror.c:191:8: note: each undeclared identifier is reported only once for each function it appears in
  exit code: 1
  running: "gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-O2" "-D_FORTIFY_SOURCE=2" "-I/usr/local/include" "-I/usr/include" "-I/usr/include/krb5" "-I/usr/local/include/python3.8" "-I" "curl/lib" "-I" "curl/include" "-I" "/usr/pkgsrc/lang/rust/work/rustc-1.52.1-src/build/aarch64-unknown-netbsd/stage2-tools/aarch64-unknown-netbsd/release/build/libnghttp2-sys-939bfb82b05e4e2d/out/i/include" "-fvisibility=hidden" "-DBUILDING_LIBCURL" "-DCURL_DISABLE_CRYPTO_AUTH" "-DCURL_DISABLE_DICT" "-DCURL_DISABLE_GOPHER" "-DCURL_DISABLE_IMAP" "-DCURL_DISABLE_LDAP" "-DCURL_DISABLE_LDAPS" "-DCURL_DISABLE_NTLM" "-DCURL_DISABLE_POP3" "-DCURL_DISABLE_RTSP" "-DCURL_DISABLE_SMB" "-DCURL_DISABLE_SMTP" "-DCURL_DISABLE_TELNET" "-DCURL_DISABLE_TFTP" "-DCURL_STATICLIB" "-DENABLE_IPV6" "-DHAVE_ASSERT_H" "-DOS=\"unknown\"" "-DHAVE_ZLIB_H" "-DHAVE_LIBZ" "-DHAVE_GETADDRINFO" "-DHAVE_GETPEERNAME" "-DHAVE_GETSOCKNAME" "-DCURL_DISABLE_FTP" "-DUSE_NGHTT
 P2" "-DNGHTTP2_STATICLIB" "-DUSE_UNIX_SOCKETS" "-DHAVE_SYS_UN_H" "-DUSE_OPENSSL" "-DHAVE_CLOCK_GETTIME_MONOTONIC" "-DHAVE_GETTIMEOFDAY" "-DRECV_TYPE_ARG1=int" "-DHAVE_PTHREAD_H" "-DHAVE_ARPA_INET_H" "-DHAVE_ERRNO_H" "-DHAVE_FCNTL_H" "-DHAVE_NETDB_H" "-DHAVE_NETINET_IN_H" "-DHAVE_POLL_FINE" "-DHAVE_POLL_H" "-DHAVE_FCNTL_O_NONBLOCK" "-DHAVE_SYS_SELECT_H" "-DHAVE_SYS_STAT_H" "-DHAVE_UNISTD_H" "-DHAVE_RECV" "-DHAVE_SELECT" "-DHAVE_SEND" "-DHAVE_SOCKET" "-DHAVE_STERRROR_R" "-DHAVE_SOCKETPAIR" "-DHAVE_STRUCT_TIMEVAL" "-DUSE_THREADS_POSIX" "-DRECV_TYPE_ARG2=void*" "-DRECV_TYPE_ARG3=size_t" "-DRECV_TYPE_ARG4=int" "-DRECV_TYPE_RETV=ssize_t" "-DSEND_QUAL_ARG2=const" "-DSEND_TYPE_ARG1=int" "-DSEND_TYPE_ARG2=void*" "-DSEND_TYPE_ARG3=size_t" "-DSEND_TYPE_ARG4=int" "-DSEND_TYPE_RETV=ssize_t" "-DSIZEOF_CURL_OFF_T=8" "-DSIZEOF_INT=4" "-DSIZEOF_SHORT=2" "-DSIZEOF_SSIZE_T=8" "-DSIZEOF_SIZE_T=8" "-DSIZEOF_LONG=8" "-o" "/usr/pkgsrc/lang/rust/work/rustc-1.52.1-src/build/aarch64-unknown-netbsd/stage2-too
 ls/aarch64-unknown-netbsd/release/build/curl-sys-4535
484fa02b1619/out/build/curl/lib/strtok.o" "-c" "curl/lib/strtok.c"
  exit code: 0

  --- stderr


  error occurred: Command "gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-O2" "-D_FORTIFY_SOURCE=2" "-I/usr/local/include" "-I/usr/include" "-I/usr/include/krb5" "-I/usr/local/include/python3.8" "-I" "curl/lib" "-I" "curl/include" "-I" "/usr/pkgsrc/lang/rust/work/rustc-1.52.1-src/build/aarch64-unknown-netbsd/stage2-tools/aarch64-unknown-netbsd/release/build/libnghttp2-sys-939bfb82b05e4e2d/out/i/include" "-fvisibility=hidden" "-DBUILDING_LIBCURL" "-DCURL_DISABLE_CRYPTO_AUTH" "-DCURL_DISABLE_DICT" "-DCURL_DISABLE_GOPHER" "-DCURL_DISABLE_IMAP" "-DCURL_DISABLE_LDAP" "-DCURL_DISABLE_LDAPS" "-DCURL_DISABLE_NTLM" "-DCURL_DISABLE_POP3" "-DCURL_DISABLE_RTSP" "-DCURL_DISABLE_SMB" "-DCURL_DISABLE_SMTP" "-DCURL_DISABLE_TELNET" "-DCURL_DISABLE_TFTP" "-DCURL_STATICLIB" "-DENABLE_IPV6" "-DHAVE_ASSERT_H" "-DOS=\"unknown\"" "-DHAVE_ZLIB_H" "-DHAVE_LIBZ" "-DHAVE_GETADDRINFO" "-DHAVE_GETPEERNAME" "-DHAVE_GETSOCKNAME" "-DCURL_DISABLE_FT
 P" "-DUSE_NGHTTP2" "-DNGHTTP2_STATICLIB" "-DUSE_UNIX_SOCKETS" "-DHAVE_SYS_UN_H" "-DUSE_OPENSSL" "-DHAVE_CLOCK_GETTIME_MONOTONIC" "-DHAVE_GETTIMEOFDAY" "-DRECV_TYPE_ARG1=int" "-DHAVE_PTHREAD_H" "-DHAVE_ARPA_INET_H" "-DHAVE_ERRNO_H" "-DHAVE_FCNTL_H" "-DHAVE_NETDB_H" "-DHAVE_NETINET_IN_H" "-DHAVE_POLL_FINE" "-DHAVE_POLL_H" "-DHAVE_FCNTL_O_NONBLOCK" "-DHAVE_SYS_SELECT_H" "-DHAVE_SYS_STAT_H" "-DHAVE_UNISTD_H" "-DHAVE_RECV" "-DHAVE_SELECT" "-DHAVE_SEND" "-DHAVE_SOCKET" "-DHAVE_STERRROR_R" "-DHAVE_SOCKETPAIR" "-DHAVE_STRUCT_TIMEVAL" "-DUSE_THREADS_POSIX" "-DRECV_TYPE_ARG2=void*" "-DRECV_TYPE_ARG3=size_t" "-DRECV_TYPE_ARG4=int" "-DRECV_TYPE_RETV=ssize_t" "-DSEND_QUAL_ARG2=const" "-DSEND_TYPE_ARG1=int" "-DSEND_TYPE_ARG2=void*" "-DSEND_TYPE_ARG3=size_t" "-DSEND_TYPE_ARG4=int" "-DSEND_TYPE_RETV=ssize_t" "-DSIZEOF_CURL_OFF_T=8" "-DSIZEOF_INT=4" "-DSIZEOF_SHORT=2" "-DSIZEOF_SSIZE_T=8" "-DSIZEOF_SIZE_T=8" "-DSIZEOF_LONG=8" "-o" "/usr/pkgsrc/lang/rust/work/rustc-1.52.1-src/build/aarch64-unknown-ne
 tbsd/stage2-tools/aarch64-unknown-netbsd/release/buil
d/curl-sys-4535484fa02b1619/out/build/curl/lib/strerror.o" "-c" "curl/lib/strerror.c" with args "gcc" did not execute successfully (status code exit code: 1).


warning: build failed, waiting for other jobs to finish...
error: build failed
command did not execute successfully: "/usr/pkgsrc/lang/rust/work/rust-bootstrap/bin/cargo" "build" "--target" "aarch64-unknown-netbsd" "-Zbinary-dep-depinfo" "-j" "1" "--release" "--frozen" "--manifest-path" "/usr/pkgsrc/lang/rust/work/rustc-1.52.1-src/src/tools/cargo/Cargo.toml" "--message-format" "json-render-diagnostics"
expected success, got: exit code: 101
Traceback (most recent call last):
  File "./x.py", line 27, in <module>
    bootstrap.main()
  File "/usr/pkgsrc/lang/rust/work/rustc-1.52.1-src/src/bootstrap/bootstrap.py", line 1183, in main
    bootstrap(help_triggered)
  File "/usr/pkgsrc/lang/rust/work/rustc-1.52.1-src/src/bootstrap/bootstrap.py", line 1169, in bootstrap
    run(args, env=env, verbose=build.verbose)
  File "/usr/pkgsrc/lang/rust/work/rustc-1.52.1-src/src/bootstrap/bootstrap.py", line 153, in run
    raise RuntimeError(err)
RuntimeError: failed to run: /usr/pkgsrc/lang/rust/work/rustc-1.52.1-src/build/bootstrap/debug/bootstrap -v build --stage 2 -j 1
*** Error code 1

Stop.
make[1]: stopped in /usr/pkgsrc/lang/rust

>How-To-Repeat:

>Fix:


>Audit-Trail:
From: Thomas Klausner <wiz@NetBSD.org>
To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: pkg/56335: lang/rust fails on NetBSD/aarch64 with gcc 10.3.0
Date: Fri, 30 Jul 2021 09:34:02 +0200

 On Thu, Jul 29, 2021 at 05:40:00AM +0000, john@ziaspace.com wrote:
 > >Number:         56335
 > >Category:       pkg
 > >Synopsis:       lang/rust fails on NetBSD/aarch64 with gcc 10.3.0

 rust builds fine for me on 9.99.87/amd64 with gcc 10.3.0.

 > Trying to compile rust on another aarch64 system running 9.99.87 with gcc=
  10.3.0
 > fails with:
 >=20
 >   running: "gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-=
 O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-O2" "-D_FORTIFY_SOURC=
 E=3D2" "-I/usr/local/include" "-I/usr/include" "-I/usr/include/krb5" "-I/us=
 r/local/include/python3.8" "-I" "curl/lib" "-I" "curl/include" "-I" "/usr/p=
 kgsrc/lang/rust/work/rustc-1.52.1-src/build/aarch64-unknown-netbsd/stage2-t=
 ools/aarch64-unknown-netbsd/release/build/libnghttp2-sys-939bfb82b05e4e2d/o=
 ut/i/include" "-fvisibility=3Dhidden" "-DBUILDING_LIBCURL" "-DCURL_DISABLE_=
 CRYPTO_AUTH" "-DCURL_DISABLE_DICT" "-DCURL_DISABLE_GOPHER" "-DCURL_DISABLE_=
 IMAP" "-DCURL_DISABLE_LDAP" "-DCURL_DISABLE_LDAPS" "-DCURL_DISABLE_NTLM" "-=
 DCURL_DISABLE_POP3" "-DCURL_DISABLE_RTSP" "-DCURL_DISABLE_SMB" "-DCURL_DISA=
 BLE_SMTP" "-DCURL_DISABLE_TELNET" "-DCURL_DISABLE_TFTP" "-DCURL_STATICLIB" =
 "-DENABLE_IPV6" "-DHAVE_ASSERT_H" "-DOS=3D\"unknown\"" "-DHAVE_ZLIB_H" "-DH=
 AVE_LIBZ" "-DHAVE_GETADDRINFO" "-DHAVE_GETPEERNAME" "-DHAVE_GETSOCKNAME" "-=
 DCURL_DISABLE_FTP" "-DUSE_NGHTT
 >  P2" "-DNGHTTP2_STATICLIB" "-DUSE_UNIX_SOCKETS" "-DHAVE_SYS_UN_H" "-DUSE_=
 OPENSSL" "-DHAVE_CLOCK_GETTIME_MONOTONIC" "-DHAVE_GETTIMEOFDAY" "-DRECV_TYP=
 E_ARG1=3Dint" "-DHAVE_PTHREAD_H" "-DHAVE_ARPA_INET_H" "-DHAVE_ERRNO_H" "-DH=
 AVE_FCNTL_H" "-DHAVE_NETDB_H" "-DHAVE_NETINET_IN_H" "-DHAVE_POLL_FINE" "-DH=
 AVE_POLL_H" "-DHAVE_FCNTL_O_NONBLOCK" "-DHAVE_SYS_SELECT_H" "-DHAVE_SYS_STA=
 T_H" "-DHAVE_UNISTD_H" "-DHAVE_RECV" "-DHAVE_SELECT" "-DHAVE_SEND" "-DHAVE_=
 SOCKET" "-DHAVE_STERRROR_R" "-DHAVE_SOCKETPAIR" "-DHAVE_STRUCT_TIMEVAL" "-D=
 USE_THREADS_POSIX" "-DRECV_TYPE_ARG2=3Dvoid*" "-DRECV_TYPE_ARG3=3Dsize_t" "=
 -DRECV_TYPE_ARG4=3Dint" "-DRECV_TYPE_RETV=3Dssize_t" "-DSEND_QUAL_ARG2=3Dco=
 nst" "-DSEND_TYPE_ARG1=3Dint" "-DSEND_TYPE_ARG2=3Dvoid*" "-DSEND_TYPE_ARG3=
 =3Dsize_t" "-DSEND_TYPE_ARG4=3Dint" "-DSEND_TYPE_RETV=3Dssize_t" "-DSIZEOF_=
 CURL_OFF_T=3D8" "-DSIZEOF_INT=3D4" "-DSIZEOF_SHORT=3D2" "-DSIZEOF_SSIZE_T=
 =3D8" "-DSIZEOF_SIZE_T=3D8" "-DSIZEOF_LONG=3D8" "-o" "/usr/pkgsrc/lang/rust=
 /work/rustc-1.52.1-src/build/aarch64-unknown-netbsd/stage2-too
 >  ls/aarch64-unknown-netbsd/release/build/curl-sys-4535
 > 484fa02b1619/out/build/curl/lib/strerror.o" "-c" "curl/lib/strerror.c"
 >   cargo:warning=3Dcurl/lib/strerror.c: In function 'curl_easy_strerror':
 >   cargo:warning=3Dcurl/lib/strerror.c:191:8: error: 'CURLE_TELNET_OPTION_=
 SYNTAX' undeclared (first use in this function); did you mean 'CURLE_SETOPT=
 _OPTION_SYNTAX'?
 >   cargo:warning=3D  191 |   case CURLE_TELNET_OPTION_SYNTAX :
 >   cargo:warning=3D      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~
 >   cargo:warning=3D      |        CURLE_SETOPT_OPTION_SYNTAX
 >   cargo:warning=3Dcurl/lib/strerror.c:191:8: note: each undeclared identi=
 fier is reported only once for each function it appears in
 >   exit code: 1

 This symbol has been in curl since forever
 (https://github.com/curl/curl/blob/master/docs/libcurl/symbols-in-versions
 says 7.7 which was in pkgsrc in 2001).

 The rust package has a curl dependency for me, with rust default options:

 # make show-buildlink3 | grep curl
 curl

 Do you have curl installed?
 Does rust have a curl dependency in your setup?
  Thomas

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.