On Mon, Feb 26, 2024 at 10:49:55AM -0700, Brian Inglis via Cygwin wrote: > On 2024-02-25 21:33, gs-cygwin.com--- via Cygwin wrote: > > Does gcc now depend on libintl-devel ? Is this dependency declared? > > > > Along with the release of cygwin 3.5.0, my CI on github started failing, > > where autoconf would report that a working C compiler was not found for > > the Cygwin build. > > > > The github workflow in question: search for "Windows-Cygwin" in > > https://github.com/lighttpd/lighttpd1.4/blob/master/.github/workflows/pr.yml > > > > I added libintl-devel package to the package install list and things > > started working again. This was a couple weeks ago and I forget exactly > > what I did to reproduce it locally, but if you need more details, I can > > try to document more carefully. > > > > Here is the workflow job which failed two weeks ago: > > https://github.com/gstrauss/lighttpd1.4/actions/runs/7841762861/job/21398761239 > > checking whether the C compiler works... no > > configure: error: in '/cygdrive/d/a/lighttpd1.4/lighttpd1.4': > > configure: error: C compiler cannot create executables > > $ cygcheck gcc > Found: C:/.../cygwin64/bin/gcc.exe > C:/.../cygwin64/bin/gcc.exe > C:/.../cygwin64/bin/cygwin1.dll > C:/WINDOWS/system32/KERNEL32.dll > C:/WINDOWS/system32/ntdll.dll > C:/WINDOWS/system32/KERNELBASE.dll > C:/.../cygwin64/bin/cygiconv-2.dll > C:/.../cygwin64/bin/cygintl-8.dll > > so gcc depends on packages libiconv2 and libintl8, and others, providing the > DLLs, as documented on the gcc-core package summary page: > > https://cygwin.com/packages/summary/gcc-core.html > > and building gcc-core etc. will require libiconv-devel and libintl-devel. > > Check your package build dependencies, and config logs, as internationalized > packages, as yours may be, require any or all of gettext-devel, > libiconv-devel, libintl-devel, po4a to build, and some of your build > dependencies may require headers or libraries provided by -devel packages, > as cygwin itself requires libintl8, and those -devel packages to build. > > You may want to rerun configure with --verbose messages and look at what the > failing check script and test program expects to be available to use.
I tracked down the problem to using -t in & C:\setup.exe -qgnO -t | Out-Default where the significant flag is -t (--allow-test-packages) If I remove -t, then my build is fine. If I add -t, then autoconf fails in ./configure with: checking for gcc... gcc checking whether the C compiler works... no configure: error: in '/cygdrive/d/a/lighttpd1.4/lighttpd1.4': configure: error: C compiler cannot create executables If I explicitly install libintl-devel in the container setup, and then run the above command with -t, then my build is fine. ==> Would the gcc maintainer take a look at what is in test packages declared dependencies? When I run with (-t): & C:\setup.exe -qgnO -t | Out-Default 22 install gcc-g++ 13.2.1+20240203-0.1 23 erase gcc-g++ 11.4.0-1 https://github.com/gstrauss/lighttpd1.4/actions/runs/8059762782/job/22014713232 (log contains output of cygcheck gcc) ...Some more attempts later, I see this in config.log when my container has a *minimal* set of packages installed. Missing -liconv. Apparently iconv is a dependency of some other packages in my full build. configure:4330: checking whether the C compiler works configure:4352: gcc conftest.c >&5 /usr/lib/gcc/x86_64-pc-cygwin/13/../../../../x86_64-pc-cygwin/bin/ld: cannot find -liconv: No such file or directory collect2: error: ld returned 1 exit status I understand that I can manually install additional packages. My question is that if I install gcc test package via & C:\setup.exe -qgnO -t | Out-Default shouldn't setup.exe should also install the appropriate dependencies in order for the updated gcc to work? My container had a working gcc 11.4.0 prior to & C:\setup.exe -qgnO -t | Out-Default and has a broken gcc 13.2.1 after the update. After reconfiguring the container to use my original set of packages (minus libintl-devel): configure:4330: checking whether the C compiler works configure:4352: gcc conftest.c >&5 /usr/lib/gcc/x86_64-pc-cygwin/13/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lintl: No such file or directory collect2: error: ld returned 1 exit status Adding back libintl-devel and things work again. https://github.com/lighttpd/lighttpd1.4/blob/master/.github/workflows/ci.yml Cheers, Glenn -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple