public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "daniel.santos at pobox dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug go/68931] gccgo fails to build using MUSL libc
Date: Sat, 17 Oct 2020 14:01:40 +0000	[thread overview]
Message-ID: <bug-68931-4-nQ8gEX4K7U@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-68931-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68931

Daniel Santos <daniel.santos at pobox dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |daniel.santos at pobox dot com

--- Comment #4 from Daniel Santos <daniel.santos at pobox dot com> ---
Hello.  This is still a problem in 10.2 and I'm definitely going to need to
solve this.  As near as I can tell, the underlying issue is libgo/config.h
incorrectly being populated with HAVE_OFF64_T.

configure:11206: checking for off64_t
configure:11206:
/home/daniel/proj/embedded/openwrt/head/build_dir/toolchain-mipsel_24kc_gcc-10.2.0_musl/gcc-10.2.0-final/./gcc/xgcc
-B/home/daniel/proj/embedded/openwrt/head/build_dir/toolchain-mipsel_24kc_gcc-10.2.0_musl/gcc-10.2.0-final/./gcc/
-B/home/daniel/proj/embedded/openwrt/head/staging_dir/toolchain-mipsel_24kc_gcc-10.2.0_musl/mipsel-openwrt-linux-musl/bin/
-B/home/daniel/proj/embedded/openwrt/head/staging_dir/toolchain-mipsel_24kc_gcc-10.2.0_musl/mipsel-openwrt-linux-musl/lib/
-isystem
/home/daniel/proj/embedded/openwrt/head/staging_dir/toolchain-mipsel_24kc_gcc-10.2.0_musl/mipsel-openwrt-linux-musl/include
-isystem
/home/daniel/proj/embedded/openwrt/head/staging_dir/toolchain-mipsel_24kc_gcc-10.2.0_musl/mipsel-openwrt-linux-musl/sys-include
   -c -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -g3 -fno-caller-saves
-fno-plt -fhonour-copts -Wno-error=unused-but-set-variable
-Wno-error=unused-result -msoft-float -Wformat -Werror=format-security
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE  conftest.c >&5
configure:11206: $? = 0
configure:11206:
/home/daniel/proj/embedded/openwrt/head/build_dir/toolchain-mipsel_24kc_gcc-10.2.0_musl/gcc-10.2.0-final/./gcc/xgcc
-B/home/daniel/proj/embedded/openwrt/head/build_dir/toolchain-mipsel_24kc_gcc-10.2.0_musl/gcc-10.2.0-final/./gcc/
-B/home/daniel/proj/embedded/openwrt/head/staging_dir/toolchain-mipsel_24kc_gcc-10.2.0_musl/mipsel-openwrt-linux-musl/bin/
-B/home/daniel/proj/embedded/openwrt/head/staging_dir/toolchain-mipsel_24kc_gcc-10.2.0_musl/mipsel-openwrt-linux-musl/lib/
-isystem
/home/daniel/proj/embedded/openwrt/head/staging_dir/toolchain-mipsel_24kc_gcc-10.2.0_musl/mipsel-openwrt-linux-musl/include
-isystem
/home/daniel/proj/embedded/openwrt/head/staging_dir/toolchain-mipsel_24kc_gcc-10.2.0_musl/mipsel-openwrt-linux-musl/sys-include
   -c -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -g3 -fno-caller-saves
-fno-plt -fhonour-copts -Wno-error=unused-but-set-variable
-Wno-error=unused-result -msoft-float -Wformat -Werror=format-security
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE  conftest.c >&5
conftest.c: In function 'main':
conftest.c:146:22: error: expected expression before ')' token
  146 | if (sizeof ((off64_t)))
      |                      ^
configure:11206: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "package-unused"
| #define PACKAGE_TARNAME "libgo"
| #define PACKAGE_VERSION "version-unused"
| #define PACKAGE_STRING "package-unused version-unused"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define USE_LIBFFI 1
| #define HAVE_GETIPINFO 1
| #define HAVE_SCHED_H 1
| #define HAVE_SEMAPHORE_H 1
| #define HAVE_SYS_FILE_H 1
| #define HAVE_SYS_MMAN_H 1
| #define HAVE_SYSCALL_H 1
| #define HAVE_SYS_EPOLL_H 1
| #define HAVE_SYS_INOTIFY_H 1
| #define HAVE_SYS_PTRACE_H 1
| #define HAVE_SYS_SYSCALL_H 1
| #define HAVE_SYS_USER_H 1
| #define HAVE_SYS_UTSNAME_H 1
| #define HAVE_SYS_SELECT_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_NET_IF_H 1
| #define HAVE_NET_IF_ARP_H 1
| #define HAVE_NET_ROUTE_H 1
| #define HAVE_NETPACKET_PACKET_H 1
| #define HAVE_SYS_PRCTL_H 1
| #define HAVE_SYS_MOUNT_H 1
| #define HAVE_SYS_VFS_H 1
| #define HAVE_SYS_STATFS_H 1
| #define HAVE_SYS_TIMEX_H 1
| #define HAVE_SYS_SYSINFO_H 1
| #define HAVE_UTIME_H 1
| #define HAVE_LINUX_FS_H 1
| #define HAVE_LINUX_PTRACE_H 1
| #define HAVE_LINUX_REBOOT_H 1
| #define HAVE_NETINET_IP_H 1
| #define HAVE_NETINET_IF_ETHER_H 1
| #define HAVE_NETINET_ICMP6_H 1
| #define HAVE_LINUX_FILTER_H 1
| #define HAVE_LINUX_IF_ADDR_H 1
| #define HAVE_LINUX_IF_ETHER_H 1
| #define HAVE_LINUX_IF_TUN_H 1
| #define HAVE_LINUX_NETLINK_H 1
| #define HAVE_LINUX_RTNETLINK_H 1
| #define HAVE_STRERROR_R 1
| #define HAVE_STRSIGNAL 1
| #define HAVE_WAIT4 1
| #define HAVE_MINCORE 1
| #define HAVE_SETENV 1
| #define HAVE_UNSETENV 1
| #define HAVE_DL_ITERATE_PHDR 1
| #define HAVE_MEMMEM 1
| #define HAVE_ACCEPT4 1
| #define HAVE_DUP3 1
| #define HAVE_EPOLL_CREATE1 1
| #define HAVE_FACCESSAT 1
| #define HAVE_FALLOCATE 1
| #define HAVE_FCHMODAT 1
| #define HAVE_FCHOWNAT 1
| #define HAVE_FUTIMESAT 1
| #define HAVE_GETXATTR 1
| #define HAVE_INOTIFY_ADD_WATCH 1
| #define HAVE_INOTIFY_INIT 1
| #define HAVE_INOTIFY_INIT1 1
| #define HAVE_INOTIFY_RM_WATCH 1
| #define HAVE_LISTXATTR 1
| #define HAVE_MKDIRAT 1
| #define HAVE_MKNODAT 1
| #define HAVE_OPEN64 1
| #define HAVE_OPENAT 1
| #define HAVE_PIPE2 1
| #define HAVE_REMOVEXATTR 1
| #define HAVE_RENAMEAT 1
| #define HAVE_SETXATTR 1
| #define HAVE_SYNC_FILE_RANGE 1
| #define HAVE_SPLICE 1
| #define HAVE_SYSCALL 1
| #define HAVE_TEE 1
| #define HAVE_UNLINKAT 1
| #define HAVE_UNSHARE 1
| #define HAVE_UTIMENSAT 1
| #define HAVE_COSL 1
| #define HAVE_EXPL 1
| #define HAVE_LOGL 1
| #define HAVE_SINL 1
| #define HAVE_TANL 1
| #define HAVE_ACOSL 1
| #define HAVE_ASINL 1
| #define HAVE_ATANL 1
| #define HAVE_ATAN2L 1
| #define HAVE_EXPM1L 1
| #define HAVE_LDEXPL 1
| #define HAVE_LOG10L 1
| #define HAVE_LOG1PL 1
| #define HAVE_SEM_TIMEDWAIT 1
| /* end confdefs.h.  */
| #include <stdio.h>
| #ifdef HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif
| #ifdef HAVE_SYS_STAT_H
| # include <sys/stat.h>
| #endif
| #ifdef STDC_HEADERS
| # include <stdlib.h>
| # include <stddef.h>
| #else
| # ifdef HAVE_STDLIB_H
| #  include <stdlib.h>
| # endif
| #endif
| #ifdef HAVE_STRING_H
| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
| #  include <memory.h>
| # endif
| # include <string.h>
| #endif
| #ifdef HAVE_STRINGS_H
| # include <strings.h>
| #endif
| #ifdef HAVE_INTTYPES_H
| # include <inttypes.h>
| #endif
| #ifdef HAVE_STDINT_H
| # include <stdint.h>
| #endif
| #ifdef HAVE_UNISTD_H
| # include <unistd.h>
| #endif
| int
| main ()
| {
| if (sizeof ((off64_t)))
|           return 0;
|   ;
|   return 0;
| }
configure:11206: result: yes



Incidentally, here's musl's note on off64_t:
https://wiki.musl-libc.org/faq.html#Q:-Do-I-need-to-define-%3Ccode%3E_LARGEFILE64_SOURCE%3C/code%3E-to-get-64bit-%3Ccode%3Eoff_t%3C/code%3E?

       reply	other threads:[~2020-10-17 14:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-68931-4@http.gcc.gnu.org/bugzilla/>
2020-10-17 14:01 ` daniel.santos at pobox dot com [this message]
2020-10-17 15:51 ` daniel.santos at pobox dot com
2021-12-27 23:13 ` pinskia at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-68931-4-nQ8gEX4K7U@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).