Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to compile msys2-runtime #1906

Closed
xzn opened this issue Mar 27, 2020 · 2 comments
Closed

Unable to compile msys2-runtime #1906

xzn opened this issue Mar 27, 2020 · 2 comments

Comments

@xzn
Copy link

xzn commented Mar 27, 2020

Trying to compile msys2-runtime for some modification,

Last few lines of output:

ar rcv libgmon.a gmon.o mcount.o profil.o mcountFunc.o
ar cru libautomode.a automode.o
ar cru libbinmode.a binmode.o
ar cru libtextmode.a textmode.o
a - gmon.o
a - mcount.o
a - profil.o
a - mcountFunc.o
ar cru libtextreadmode.a textreadmode.o
g++ -B/j/Sources/C++/_xzn/msys2-runtime/src/build-x86_64-pc-msys/x86_64-pc-msys/libstdc++-v3/src/.libs -B/j/Sources/C++
/_xzn/msys2-runtime/src/build-x86_64-pc-msys/x86_64-pc-msys/libstdc++-v3/libsupc++/.libs -L/j/Sources/C++/_xzn/msys2-ru
ntime/src/build-x86_64-pc-msys/x86_64-pc-msys/winsup/cygwin -isystem /j/Sources/C++/_xzn/msys2-runtime/src/msys2-runtim
e/winsup/cygwin/include -B/j/Sources/C++/_xzn/msys2-runtime/src/build-x86_64-pc-msys/x86_64-pc-msys/newlib/ -isystem /j
/Sources/C++/_xzn/msys2-runtime/src/build-x86_64-pc-msys/x86_64-pc-msys/newlib/targ-include -isystem /j/Sources/C++/_xz
n/msys2-runtime/src/msys2-runtime/newlib/libc/include    -pipe -Wno-error=deprecated -Wno-error=stringop-truncation -Wn
o-error=missing-attributes -Wno-error=maybe-uninitialized -O2 -g -ggdb \
-mno-use-libstdc-wrappers -L/usr/lib/w32api \
-Wl,--gc-sections -nostdlib -Wl,-Tcygwin.sc -static \
-Wl,--heap=0 -Wl,--out-implib,msysdll.a -shared -o msys0.dll \
-e dll_entry msys.def advapi32.o aio.o arc4random_stir.o assert.o autoload.o base64.o bsdlib.o clock.o ctype.o cxx.o cy
gheap.o cygthread.o cygtls.o cygwait.o cygxdr.o dcrt0.o debug.o devices.o dir.o dlfcn.o dll_init.o dtable.o environ.o e
rrno.o exceptions.o exec.o external.o fcntl.o fenv.o fhandler.o fhandler_clipboard.o fhandler_console.o fhandler_cygdri
ve.o fhandler_dev.o fhandler_disk_file.o fhandler_dsp.o fhandler_fifo.o fhandler_floppy.o fhandler_netdrive.o fhandler_
nodevice.o fhandler_pipe.o fhandler_proc.o fhandler_process.o fhandler_process_fd.o fhandler_procnet.o fhandler_procsys
.o fhandler_procsysvipc.o fhandler_random.o fhandler_raw.o fhandler_registry.o fhandler_serial.o fhandler_signalfd.o fh
andler_socket.o fhandler_socket_inet.o fhandler_socket_local.o fhandler_socket_unix.o fhandler_tape.o fhandler_termios.
o fhandler_timerfd.o fhandler_tty.o fhandler_virtual.o fhandler_windows.o fhandler_zero.o flock.o fnmatch.o fork.o fork
able.o fts.o ftw.o getentropy.o getopt.o glob.o glob_pattern_p.o globals.o grp.o heap.o hookapi.o inet_addr.o inet_netw
ork.o init.o ioctl.o ipc.o kernel32.o ldap.o libstdcxx_wrapper.o loadavg.o localtime.o lsearch.o malloc_wrapper.o minir
es-os-if.o minires.o miscfuncs.o mktemp.o mmap.o msg.o msgcat.o msys2_path_conv.o mount.o net.o netdb.o nfs.o nftw.o nl
sfuncs.o ntea.o passwd.o path.o pinfo.o poll.o posix_ipc.o posix_timer.o pseudo-reloc.o pthread.o quotactl.o random.o r
egcomp.o regerror.o regexec.o regfree.o registry.o resource.o rexec.o rcmd.o scandir.o sched.o sec_acl.o sec_auth.o sec
_helper.o sec_posixacl.o security.o select.o sem.o setlsapwd.o shared.o shm.o sigfe.o signal.o sigproc.o smallprint.o s
pawn.o strace.o strfmon.o strfuncs.o strptime.o strsep.o strsig.o sync.o syscalls.o sysconf.o syslog.o termios.o thread
.o timerfd.o times.o tls_pbuf.o tty.o uinfo.o uname.o wait.o wincap.o window.o winf.o xsique.o  malloc.o acoshl.o acosl
.o asinhl.o asinl.o atan2l.o atanhl.o atanl.o cabsl.o cacosl.o cargl.o casinl.o catanl.o cbrtl.o ccosl.o ceill.o cephes
_emath.o cexpl.o cimagl.o clog10l.o clogl.o conjl.o copysignl.o coshl.o cosl.o cosl_internal.o cossin.o cpowl.o cprojl.
o creall.o csinl.o csqrtl.o ctanl.o erfl.o exp10l.o exp2l.o expl.o expm1l.o fabsl.o fdiml.o finite.o floorl.o fmal.o fm
axl.o fminl.o fmodl.o frexpl.o ilogbl.o internal_logl.o isinf.o isnan.o ldexpl.o lgammal.o llrint.o llrintf.o llrintl.o
 llroundl.o log10l.o log1pl.o log2l.o logbl.o logl.o lrint.o lrintf.o lrintl.o lroundl.o modfl.o nearbyint.o nearbyintf
.o nearbyintl.o nextafterl.o nexttoward.o nexttowardf.o pow10l.o powil.o powl.o remainder.o remainderf.o remainderl.o r
emquol.o rint.o rintf.o rintl.o roundl.o scalbl.o scalbnl.o sinhl.o sinl.o sinl_internal.o sqrtl.o tanhl.o tanl.o tgamm
al.o truncl.o  version.o winver.o \
 /j/Sources/C++/_xzn/msys2-runtime/src/build-x86_64-pc-msys/x86_64-pc-msys/winsup/cygserver/libcygserver.a /j/Sources/C
++/_xzn/msys2-runtime/src/build-x86_64-pc-msys/x86_64-pc-msys/newlib/libm/libm.a /j/Sources/C++/_xzn/msys2-runtime/src/
build-x86_64-pc-msys/x86_64-pc-msys/newlib/libc/libc.a \
-lgcc /usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../lib/w32api/libkernel32.a /usr/lib/gcc/x86_64-pc-msys/9.3.0/../../..
/../lib/w32api/libntdll.a -Wl,-Map,msys.map
+ objcopy -R .gnu_debuglink_overlay --add-gnu-debuglink=/dev/null --only-keep-debug msys0.dll msys-2.0.dbg
+ objcopy -g --add-gnu-debuglink=msys-2.0.dbg msys0.dll
+ objcopy -R .gnu_debuglink_overlay --set-section-flag .gnu_debuglink=contents,readonly,debug,noload --change-section-a
ddress .gnu_debuglink=0x180328000 msys0.dll
/j/Sources/C++/_xzn/msys2-runtime/src/msys2-runtime/winsup/cygwin/mkimport --cpu=x86_64 --ar=ar --as=as --nm=nm --objco
py=objcopy --replace=atexit= --replace=timezone= --replace=uname=uname_x --replace=__xdrrec_getrec= --replace=__xdrrec_
setnonblock= --replace=xdr_array= --replace=xdr_bool= --replace=xdr_bytes= --replace=xdr_char= --replace=xdr_double= --
replace=xdr_enum= --replace=xdr_float= --replace=xdr_free= --replace=xdr_hyper= --replace=xdr_int= --replace=xdr_int16_
t= --replace=xdr_int32_t= --replace=xdr_int64_t= --replace=xdr_int8_t= --replace=xdr_long= --replace=xdr_longlong_t= --
replace=xdr_netobj= --replace=xdr_opaque= --replace=xdr_pointer= --replace=xdr_reference= --replace=xdr_short= --replac
e=xdr_sizeof= --replace=xdr_string= --replace=xdr_u_char= --replace=xdr_u_hyper= --replace=xdr_u_int= --replace=xdr_u_i
nt16_t= --replace=xdr_u_int32_t= --replace=xdr_u_int64_t= --replace=xdr_u_int8_t= --replace=xdr_u_long= --replace=xdr_u
_longlong_t= --replace=xdr_u_short= --replace=xdr_uint16_t= --replace=xdr_uint32_t= --replace=xdr_uint64_t= --replace=x
dr_uint8_t= --replace=xdr_union= --replace=xdr_vector= --replace=xdr_void= --replace=xdr_wrapstring= --replace=xdrmem_c
reate= --replace=xdrrec_create= --replace=xdrrec_endofrecord= --replace=xdrrec_eof= --replace=xdrrec_skiprecord= --repl
ace=xdrstdio_create= libmsys-2.0.a msysdll.a _cygwin_crt0_common.o atexit.o cygwin_attach_dll.o cygwin_crt0.o dll_entry
.o dll_main.o dso_handle.o libcmain.o premain0.o premain1.o premain2.o premain3.o pseudo-reloc-dummy.o
objcopy: 'uname.o': No such file
make[3]: *** [Makefile:698: libmsys-2.0.a] Error 1

Steps to compile:

  1. Start msys2 shell
cd somewhere
git clone https://github.com/msys2/MSYS2-packages.git
cd MSYS2-packages/msys2-runtime
makepkg -s

Am I missing something really obvious or something?

@xzn xzn added the bug label Mar 27, 2020
@xzn
Copy link
Author

xzn commented Mar 27, 2020

Just tried a different hard drive, got a bit further this time:

...

c++wrap -pipe -Wno-error=deprecated -Wno-error=stringop-truncation -Wno-error=missing-attributes -Wno-error=maybe-unini
tialized -fno-exceptions -fno-rtti -O2 -g -ggdb -fno-rtti -fno-exceptions -fno-use-cxa-atexit -Wall -Wstrict-aliasing -
Wwrite-strings -fno-common -pipe -fbuiltin -fmessage-length=0 -c -o regtool.o /l/MSYS2-packages/msys2-runtime/src/msys2
-runtime/winsup/utils/regtool.cc
ccwrap -g -O2 -pipe -ggdb -Wno-error=deprecated -Wno-error=stringop-truncation -Wno-error=missing-attributes -Wno-error
=maybe-uninitialized -Wall -Wstrict-aliasing -Wwrite-strings -fno-common -pipe -fbuiltin -fmessage-length=0 -c -o setfa
cl.o /l/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/utils/setfacl.c
ccwrap -g -O2 -pipe -ggdb -Wno-error=deprecated -Wno-error=stringop-truncation -Wno-error=missing-attributes -Wno-error
=maybe-uninitialized -Wall -Wstrict-aliasing -Wwrite-strings -fno-common -pipe -fbuiltin -fmessage-length=0 -c -o setme
tamode.o /l/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/utils/setmetamode.c
ccwrap -g -O2 -pipe -ggdb -Wno-error=deprecated -Wno-error=stringop-truncation -Wno-error=missing-attributes -Wno-error
=maybe-uninitialized -Wall -Wstrict-aliasing -Wwrite-strings -fno-common -pipe -fbuiltin -fmessage-length=0 -c -o ssp.o
 /l/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/utils/ssp.c
ccwrap -g -O2 -pipe -ggdb -Wno-error=deprecated -Wno-error=stringop-truncation -Wno-error=missing-attributes -Wno-error
=maybe-uninitialized -Wall -Wstrict-aliasing -Wwrite-strings -fno-common -pipe -fbuiltin -fmessage-length=0 -c -o tzset
.o /l/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/utils/tzset.c
c++wrap -pipe -Wno-error=deprecated -Wno-error=stringop-truncation -Wno-error=missing-attributes -Wno-error=maybe-unini
tialized -fno-exceptions -fno-rtti -O2 -g -ggdb -fno-rtti -fno-exceptions -fno-use-cxa-atexit -Wall -Wstrict-aliasing -
Wwrite-strings -fno-common -pipe -fbuiltin -fmessage-length=0 -c -o umount.o /l/MSYS2-packages/msys2-runtime/src/msys2-
runtime/winsup/utils/umount.cc
c++wrap -pipe -Wno-error=deprecated -Wno-error=stringop-truncation -Wno-error=missing-attributes -Wno-error=maybe-unini
tialized -fno-exceptions -fno-rtti -O2 -g -ggdb -I/l/MSYS2-packages/msys2-runtime/src/msys2-runtime/include -fno-rtti -
fno-exceptions -fno-use-cxa-atexit -Wall -Wstrict-aliasing -Wwrite-strings -fno-common -pipe -fbuiltin -fmessage-length
=0 -c -o dumper.o /l/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/utils/dumper.cc
c++wrap -pipe -Wno-error=deprecated -Wno-error=stringop-truncation -Wno-error=missing-attributes -Wno-error=maybe-unini
tialized -fno-exceptions -fno-rtti -O2 -g -ggdb -I/l/MSYS2-packages/msys2-runtime/src/msys2-runtime/include -fno-rtti -
fno-exceptions -fno-use-cxa-atexit -Wall -Wstrict-aliasing -Wwrite-strings -fno-common -pipe -fbuiltin -fmessage-length
=0 -c -o module_info.o /l/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/utils/module_info.cc
c++wrap -pipe -Wno-error=deprecated -Wno-error=stringop-truncation -Wno-error=missing-attributes -Wno-error=maybe-unini
tialized -fno-exceptions -fno-rtti -O2 -g -ggdb -I/l/MSYS2-packages/msys2-runtime/src/msys2-runtime/include -fno-rtti -
fno-exceptions -fno-use-cxa-atexit -Wall -Wstrict-aliasing -Wwrite-strings -fno-common -pipe -fbuiltin -fmessage-length
=0 -c -o parse_pe.o /l/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/utils/parse_pe.cc
c++wrap -c -o cygcheck.o -pipe -Wno-error=deprecated -Wno-error=stringop-truncation -Wno-error=missing-attributes -Wno-
error=maybe-uninitialized -fno-exceptions -fno-rtti -O2 -g -ggdb  /l/MSYS2-packages/msys2-runtime/src/msys2-runtime/win
sup/utils/cygcheck.cc
c++wrap -c -o bloda.o -pipe -Wno-error=deprecated -Wno-error=stringop-truncation -Wno-error=missing-attributes -Wno-err
or=maybe-uninitialized -fno-exceptions -fno-rtti -O2 -g -ggdb  /l/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup
/utils/bloda.cc
c++wrap -c -o path.o -pipe -Wno-error=deprecated -Wno-error=stringop-truncation -Wno-error=missing-attributes -Wno-erro
r=maybe-uninitialized -fno-exceptions -fno-rtti -O2 -g -ggdb  /l/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/
utils/path.cc
/l/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/utils/ps.cc: In function 'const char* ttynam(int)':
/l/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/utils/ps.cc:101:23: warning: 'sprintf' may write a terminating
 nul past the end of the destination [-Wformat-overflow=]
  101 |   sprintf (buf, " %-7s", buf0);
      |                       ^++wrap -c -o dump_setup.o -pipe -Wno-error=deprecated -Wno-error=stringop-truncation -Wn
o-error=missing-attributes -Wno-error=maybe-uninitialized -fno-exceptions -fno-rtti -O2 -g -ggdb  /l/MSYS2-packages/msy
s2-runtime/src/msys2-runtime/winsup/utils/dump_setup.cc

/l/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/utils/ps.cc:101:11: note: 'sprintf' output between 9 and 10 by
tes into a destination of size 9
  101 |   sprintf (buf, " %-7s", buf0);
      |   ~~~~~~~~^~~~~~~~~~~~~~~~~~~~
c++wrap -pipe -Wno-error=deprecated -Wno-error=stringop-truncation -Wno-error=missing-attributes -Wno-error=maybe-unini
tialized -fno-exceptions -fno-rtti -O2 -g -ggdb -fno-rtti -fno-exceptions -fno-use-cxa-atexit -Wall -Wstrict-aliasing -
Wwrite-strings -fno-common -pipe -fbuiltin -fmessage-length=0 -c -o cygwin-console-helper.o /l/MSYS2-packages/msys2-run
time/src/msys2-runtime/winsup/utils/cygwin-console-helper.cc
c++wrap -c -o ldh.o -pipe -Wno-error=deprecated -Wno-error=stringop-truncation -Wno-error=missing-attributes -Wno-error
=maybe-uninitialized -fno-exceptions -fno-rtti -O2 -g -ggdb  /l/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/u
tils/ldh.cc
/l/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/utils/dumper.cc: In function 'void print_section_name(bfd*, as
ection*, void*)':
/l/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/utils/dumper.cc:134:22: error: 'bfd_get_section_name' was not
declared in this scope; did you mean 'bfd_get_section_by_name'?
  134 |   deb_printf (" %s", bfd_get_section_name (abfd, sect));
      |                      ^~~~~~~~~~~~~~~~~~~~
      |                      bfd_get_section_by_name
c++wrap -c -o strace.o -pipe -Wno-error=deprecated -Wno-error=stringop-truncation -Wno-error=missing-attributes -Wno-er
ror=maybe-uninitialized -fno-exceptions -fno-rtti -O2 -g -ggdb  /l/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsu
p/utils/strace.cc
/l/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/utils/dumper.cc: In member function 'int dumper::prepare_core_
dump()':
/l/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/utils/dumper.cc:715:11: error: 'bfd_get_section_size' was not
declared in this scope; did you mean 'bfd_set_section_size'?
  715 |          (bfd_get_section_size (status_section)
      |           ^~~~~~~~~~~~~~~~~~~~
      |           bfd_set_section_size[01m/l/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/utils/parse_pe.cc:
 In function 'void select_data_section(bfd*, asection*, void*)':
/l/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/utils/parse_pe.cc:76:20: error: 'bfd_get_section_size' was not
 declared in this scope; did you mean 'bfd_set_section_size'?
   76 |       sect->vma && bfd_get_section_size (sect))
/l/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/utils/dumper.cc:739:35: error: cannot convert 'bfd*' to 'asect
ion*' {aka 'bfd_section*'}
      |                      739 |       if (!bfd_set_section_flags (^~~~~~~~~~~~~~~~~~~~core_bfd
, new_section, sect_flags) ||      |
     |                                   bfd_set_section_size^~~~~~~~

      |                                   |
      |                                   bfd*
In file included from /l/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/utils/dumper.cc:23:
/usr/include/bfd.h:1410:46: note:   initializing argument 1 of 'bfd_boolean bfd_set_section_flags(asection*, flagword)'

 1410 | bfd_boolean bfd_set_section_flags (asection *sec, flagword flags);
      |                                    ~~~~~~~~~~^~~
/l/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/utils/dumper.cc:740:27:ake[3]: *** [/l/MSYS2-packages/msys2-ru
ntime/src/msys2-runtime/winsup/utils/../Makefile.common:41: parse_pe.o] Error 1
make[3]: *** Waiting for unfinished jobs....
 error: cannot convert 'bfd*' to 'asection*' {aka 'bfd_section*'}
  740 |    !bfd_set_section_size (core_bfd, new_section, sect_size))
      |                           ^~~~~~~~
      |                           |
      |                           bfd*
In file included from /l/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/utils/dumper.cc:23:
/usr/include/bfd.h:1425:45: note:   initializing argument 1 of 'bfd_boolean bfd_set_section_size(asection*, bfd_size_ty
pe)'
 1425 | bfd_boolean bfd_set_section_size (asection *sec, bfd_size_type val);
      |                                   ~~~~~~~~~~^~~
/l/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/utils/dumper.cc: In member function 'int dumper::write_core_du
mp()':
/l/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/utils/dumper.cc:824:5: error: 'bfd_get_section_size' was not d
eclared in this scope; did you mean 'bfd_set_section_size'?
  824 |     bfd_get_section_size (p->section),
      |     ^~~~~~~~~~~~~~~~~~~~
      |     bfd_set_section_size
make[3]: *** [/l/MSYS2-packages/msys2-runtime/src/msys2-runtime/winsup/utils/../Makefile.common:41: dumper.o] Error 1

@xzn
Copy link
Author

xzn commented Mar 28, 2020

I've managed to get past the second error by installing an older version of binutils.

Not sure about the first problem, may be an issue due to the repo being cloned from WSL. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant