[Bug 52292] Cygwin compilation fails in ld: undefined reference to `__main' @ include/wine/test.h

WineHQ Bugzilla wine-bugs at winehq.org
Tue Dec 28 03:24:05 CST 2021


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

Saulius K. <saulius2 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|activeds                    |-unknown
           Priority|P2                          |P4

--- Comment #1 from Saulius K. <saulius2 at gmail.com> ---
This stops in dlls/activeds/tests, but if I try building tests for other dll,
the failure looks the same:

--- snip ---
$ make -C dlls/advpack/tests/
make: Entering directory
'/cygdrive/c/cygwin64/home/saukrs/src/wine/dlls/advpack/tests'
make[1]: Entering directory '/cygdrive/c/cygwin64/home/saukrs/src/wine'
gcc -c -o dlls/advpack/tests/advpack.o dlls/advpack/tests/advpack.c
-Idlls/advpack/tests -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
gcc -c -o dlls/advpack/tests/files.o dlls/advpack/tests/files.c
-Idlls/advpack/tests -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
gcc -c -o dlls/advpack/tests/install.o dlls/advpack/tests/install.c
-Idlls/advpack/tests -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
gcc -c -o dlls/advpack/tests/testlist.o dlls/advpack/tests/testlist.c
-Idlls/advpack/tests -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 --implib -o dlls/cabinet/libcabinet.a --export
dlls/cabinet/cabinet.spec
tools/winebuild/winebuild.exe -w --implib -o dlls/advpack/libadvpack.a --export
dlls/advpack/advpack.spec
tools/winegcc/winegcc.exe -o dlls/advpack/tests/advpack_test.exe --wine-objdir
. -Wl,--disable-stdcall-fixup \
  -fasynchronous-unwind-tables -mno-cygwin dlls/advpack/tests/advpack.o
dlls/advpack/tests/files.o \
  dlls/advpack/tests/install.o dlls/advpack/tests/testlist.o
dlls/cabinet/libcabinet.a \
  dlls/advapi32/libadvapi32.a dlls/advpack/libadvpack.a
dlls/winecrt0/libwinecrt0.a \
  dlls/msvcrt/libmsvcrt.a dlls/kernel32/libkernel32.a dlls/ntdll/libntdll.a
/usr/lib/gcc/i686-pc-cygwin/10/../../../../i686-pc-cygwin/bin/ld:
dlls/advpack/tests/testlist.o: in function `main':
/cygdrive/c/cygwin64/home/saukrs/src/wine/include/wine/test.h:669: undefined
reference to `__main'
collect2: error: ld returned 1 exit status
winegcc: /usr/bin/gcc.exe failed
make[1]: *** [Makefile:3846: dlls/advpack/tests/advpack_test.exe] Error 2
make[1]: Leaving directory '/cygdrive/c/cygwin64/home/saukrs/src/wine'
make: *** [Makefile:8: all] Error 2
make: Leaving directory
'/cygdrive/c/cygwin64/home/saukrs/src/wine/dlls/advpack/tests'
--- snip ---

I am not sure what component to assign this bug to.
`winegcc` seems to be missing from the list, and `winelib` sounds
inappropriate.

-- 
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