[Bug 52287] New: Cygwin compilation fails: undefined reference to `__wine_spec_nt_header' in winecrt0/register.c

WineHQ Bugzilla wine-bugs at winehq.org
Mon Dec 27 05:51:04 CST 2021


https://bugs.winehq.org/show_bug.cgi?id=52287

            Bug ID: 52287
           Summary: Cygwin compilation fails: undefined reference to
                    `__wine_spec_nt_header' in winecrt0/register.c
           Product: Wine
           Version: unspecified
          Hardware: x86-64
                OS: other
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: winecrt0
          Assignee: wine-bugs at winehq.org
          Reporter: saulius2 at gmail.com

I installed Cygwin v3.3.3 (I guess the newest ATM) and then some packages (like
git).

--- snip ---
$ uname -a
CYGWIN_NT-10.0-WOW DESKTOP-O7JE7JE 3.3.3(0.341/5/3) 2021-12-03 16:31 i686
Cygwin
--- snip ---

Then I cloned the official Wine repo and run configuration:

--- snip ---
$ ./configure
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking whether make sets $(MAKE)... no
checking for gcc... gcc
  ...
checking for isnan... yes
checking for __builtin_popcount... yes
checking for __clear_cache... yes
checking whether we need to define __i386__... no
creating Makefile rules... done
configure: creating ./config.status
config.status: creating include/config.h
config.status: linking tools/winewrapper to wine
config.status: executing include/stamp-h commands
config.status: executing tools/makedep commands
  ...
config.status: executing Makefile commands

configure: OpenCL development files not found, OpenCL won't be supported.
configure: pcap development files not found, wpcap won't be supported.
configure: libinotify development files not found (or too old), filesystem
change notifications won't be supported.
configure: libdbus development files not found, no dynamic device support.
configure: libsane development files not found, scanners won't be supported.
configure: libusb-1.0 development files not found (or too old), USB devices
won't be supported.
configure: libv4l2 development files not found.
configure: libgphoto2 development files not found, digital cameras won't be
supported.
configure: libgphoto2_port development files not found, digital cameras won't
be auto-detected.
configure: libpulse development files not found or too old, Pulse won't be
supported.
configure: gstreamer-1.0 base plugins development files not found, GStreamer
won't be supported.
configure: OSS sound system found but too old (OSSv4 needed), OSS won't be
supported.
configure: libudev development files not found, plug and play won't be
supported.
configure: libSDL2 development files not found, SDL2 won't be supported.
configure: libcapi20 development files not found, ISDN won't be supported.
configure: libcups development files not found, CUPS won't be supported.
configure: fontconfig development files not found, fontconfig won't be
supported.
configure: libkrb5 development files not found (or too old), Kerberos won't be
supported.
configure: libopenal development files not found (or too old), OpenAL won't be
supported.
configure: libnetapi not found, Samba NetAPI won't be supported.
configure: libvulkan and libMoltenVK development files not found, Vulkan won't
be supported.
configure: vkd3d development files not found (or too old), Direct3D 12 won't be
supported.
configure: libldap (OpenLDAP) development files not found, LDAP won't be
supported.

configure: WARNING: gettext tools not found (or too old), translations won't be
built.

configure: WARNING: libgnutls development files not found, no schannel support.

configure: WARNING: No sound system was found. Windows applications will be
silent.

configure: Finished.  Do 'make' to compile Wine.
--- snip ---

Now if I run make, it eventually fails:

--- snip ---
saukrs at DESKTOP-O7JE7JE ~/src/wine
$ make
gcc -c -o dlls/acledit/main.o dlls/acledit/main.c -Idlls/acledit -Iinclude
-Iinclude/msvcrt -D__WINESRC__ -D_UCRT \
  -fasynchronous-unwind-tables -D_WIN32 -fno-builtin -fshort-wchar
-D__WINE_PE_BUILD -Wall -pipe \
  -fcf-protection=none -fno-stack-protector -fno-strict-aliasing
-Wdeclaration-after-statement \
  -Wempty-body -Wignored-qualifiers -Winit-self -Wno-packed-not-aligned
-Wshift-overflow=2 \
  -Wstrict-prototypes -Wtype-limits -Wunused-but-set-parameter -Wvla
-Wwrite-strings -Wpointer-arith \
  -Wlogical-op -gdwarf-4 -fno-omit-frame-pointer -g -O2
gcc -c -o tools/winebuild/import.o tools/winebuild/import.c -Itools/winebuild
-Iinclude -D__WINESRC__ -D__WINE_PE_BUILD \
  -Wall -pipe -fcf-protection=none -fno-stack-protector -fno-strict-aliasing \
  -Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers -Winit-self \
  -Wno-packed-not-aligned -Wshift-overflow=2 -Wstrict-prototypes -Wtype-limits
\
  -Wunused-but-set-parameter -Wvla -Wwrite-strings -Wpointer-arith -Wlogical-op
-gdwarf-4 \
  -fno-omit-frame-pointer -g -O2
gcc -c -o tools/winebuild/main.o tools/winebuild/main.c -Itools/winebuild
-Iinclude -D__WINESRC__ -D__WINE_PE_BUILD \
  -Wall -pipe -fcf-protection=none -fno-stack-protector -fno-strict-aliasing \
  -Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers -Winit-self \
  -Wno-packed-not-aligned -Wshift-overflow=2 -Wstrict-prototypes -Wtype-limits
\
  -Wunused-but-set-parameter -Wvla -Wwrite-strings -Wpointer-arith -Wlogical-op
-gdwarf-4 \
  -fno-omit-frame-pointer -g -O2
In file included from tools/winebuild/main.c:33:
tools/winebuild/main.c: In function ‘option_callback’:
tools/winebuild/main.c:380:28: warning: array subscript has type ‘char’
[-Wchar-subscripts]
  380 |         if (!isdigit(optarg[0]))
      |                      ~~~~~~^~~
gcc -c -o tools/winebuild/parser.o tools/winebuild/parser.c -Itools/winebuild
-Iinclude -D__WINESRC__ -D__WINE_PE_BUILD \
  -Wall -pipe -fcf-protection=none -fno-stack-protector -fno-strict-aliasing \
  -Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers -Winit-self \
  -Wno-packed-not-aligned -Wshift-overflow=2 -Wstrict-prototypes -Wtype-limits
\
  -Wunused-but-set-parameter -Wvla -Wwrite-strings -Wpointer-arith -Wlogical-op
-gdwarf-4 \
  -fno-omit-frame-pointer -g -O2
In file included from tools/winebuild/parser.c:28:
tools/winebuild/parser.c: In function ‘IsNumberString’:
tools/winebuild/parser.c:95:29: warning: array subscript has type ‘char’
[-Wchar-subscripts]
   95 |     while (*s) if (!isdigit(*s++)) return 0;
      |                             ^~~~
tools/winebuild/parser.c: In function ‘GetToken’:
tools/winebuild/parser.c:126:24: warning: array subscript has type ‘char’
[-Wchar-subscripts]
  126 |         while (isspace(*p)) p++;
      |                        ^~
tools/winebuild/parser.c:153:67: warning: array subscript has type ‘char’
[-Wchar-subscripts]
  153 |     else while (*p != '\0' && !is_token_separator(*p) && !isspace(*p))
      |                                                                   ^~
gcc -c -o tools/winebuild/relay.o tools/winebuild/relay.c -Itools/winebuild
-Iinclude -D__WINESRC__ -D__WINE_PE_BUILD \
  -Wall -pipe -fcf-protection=none -fno-stack-protector -fno-strict-aliasing \
  -Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers -Winit-self \
  -Wno-packed-not-aligned -Wshift-overflow=2 -Wstrict-prototypes -Wtype-limits
\
  -Wunused-but-set-parameter -Wvla -Wwrite-strings -Wpointer-arith -Wlogical-op
-gdwarf-4 \
  -fno-omit-frame-pointer -g -O2
  ...
tools/widl/widl.exe -o include/msdasc.h --nostdinc -Ldlls/\* -Iinclude
-Iinclude -D__WINESRC__ include/msdasc.idl
tools/widl/widl.exe -o include/oledb.h --nostdinc -Ldlls/\* -Iinclude -Iinclude
-D__WINESRC__ include/oledb.idl
tools/widl/widl.exe -o include/netcfgx.h --nostdinc -Ldlls/\* -Iinclude
-Iinclude -D__WINESRC__ \
  include/netcfgx.idl
tools/widl/widl.exe -o include/shimgdata.h --nostdinc -Ldlls/\* -Iinclude
-Iinclude -D__WINESRC__ \
  include/shimgdata.idl
tools/widl/widl.exe -o include/comsvcs.h --nostdinc -Ldlls/\* -Iinclude
-Iinclude -D__WINESRC__ \
  include/comsvcs.idl
tools/widl/widl.exe -o include/directmanipulation.h --nostdinc -Ldlls/\*
-Iinclude -Iinclude -D__WINESRC__ \
  include/directmanipulation.idl
gcc -c -o libs/uuid/uuid.o libs/uuid/uuid.c -Ilibs/uuid -Iinclude
-Iinclude/msvcrt -D__WINESRC__ -D_MSVCR_VER=0 \
  -fasynchronous-unwind-tables -D_WIN32 -fno-builtin -fshort-wchar
-D__WINE_PE_BUILD -Wall -pipe \
  -fcf-protection=none -fno-stack-protector -fno-strict-aliasing
-Wdeclaration-after-statement \
  -Wempty-body -Wignored-qualifiers -Winit-self -Wno-packed-not-aligned
-Wshift-overflow=2 \
  -Wstrict-prototypes -Wtype-limits -Wunused-but-set-parameter -Wvla
-Wwrite-strings -Wpointer-arith \
  -Wlogical-op -gdwarf-4 -fno-omit-frame-pointer -g -O2
tools/winebuild/winebuild.exe -w --staticlib -o libs/uuid/libuuid.a
libs/uuid/d2d.o libs/uuid/uuid.o
tools/winegcc/winegcc.exe -o dlls/activeds/activeds.dll --wine-objdir .
-Wl,--disable-stdcall-fixup \
  -fasynchronous-unwind-tables -shared dlls/activeds/activeds.spec
-Wb,--prefer-native -mno-cygwin \
  dlls/activeds/activeds_main.o dlls/activeds/pathname.o
dlls/activeds/activeds_r.res \
  dlls/advapi32/libadvapi32.a dlls/ole32/libole32.a dlls/oleaut32/liboleaut32.a
libs/uuid/libuuid.a \
  dlls/winecrt0/libwinecrt0.a dlls/ucrtbase/libucrtbase.a
dlls/kernel32/libkernel32.a \
  dlls/ntdll/libntdll.a
/usr/lib/gcc/i686-pc-cygwin/10/../../../../i686-pc-cygwin/bin/ld:
dlls/winecrt0/libwinecrt0.a(register.o): in function `image_base':
/home/saukrs/src/wine/dlls/winecrt0/register.c:39: undefined reference to
`__wine_spec_nt_header'
/usr/lib/gcc/i686-pc-cygwin/10/../../../../i686-pc-cygwin/bin/ld:
/home/saukrs/src/wine/dlls/winecrt0/register.c:39: undefined reference to
`__wine_spec_nt_header'
collect2: error: ld returned 1 exit status
winegcc: /usr/bin/gcc.exe failed
make: *** [Makefile:1919: dlls/activeds/activeds.dll] Error 2
--- snip ---

The failure seems to happen here:

--- snip ---
.../i686-pc-cygwin/bin/ld: dlls/winecrt0/libwinecrt0.a(register.o): in function
`image_base':
/home/saukrs/src/wine/dlls/winecrt0/register.c:39: undefined reference to
`__wine_spec_nt_header'
--- snip ---

I tried googling, but found no useful matches. Attaching the whole output.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


More information about the wine-bugs mailing list