public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug build/31050] New: Compile error in gnulib/import/closedir.c
@ 2023-11-10 23:04 madebr at gmail dot com
2023-11-10 23:18 ` [Bug build/31050] " simark at simark dot ca
2023-11-10 23:28 ` madebr at gmail dot com
0 siblings, 2 replies; 3+ messages in thread
From: madebr at gmail dot com @ 2023-11-10 23:04 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31050
Bug ID: 31050
Summary: Compile error in gnulib/import/closedir.c
Product: gdb
Version: 13.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: build
Assignee: unassigned at sourceware dot org
Reporter: madebr at gmail dot com
Target Milestone: ---
Trying to build a Windows 32-bit executable of gdb 13.2 on Linux, building
fails with the following error:
```
i686-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I../../../gnulib/import -I..
-Wno-cast-qual -Wno-conversion -Wno-float-equal -Wno-sign-compare -Wno-undef
-Wno-unused-function -Wno-unused-parameter -Wno-float-conversion
-Wimplicit-fallthrough -Wno-pedantic -Wno-sign-conversion -Wno-type-limits
-Wno-unsuffixed-float-constants -g -O2 -MT libgnu_a-closedir.o -MD -MP -MF
.deps/libgnu_a-closedir.Tpo -c -o libgnu_a-closedir.o `test -f 'closedir.c' ||
echo '../../../gnulib/import/'`closedir.c
../../../gnulib/import/closedir.c: In function 'closedir':
../../../gnulib/import/closedir.c:58:11: error: 'DIR' has no member named
'current'
58 | if (dirp->current != INVALID_HANDLE_VALUE)
| ^~
../../../gnulib/import/closedir.c:59:20: error: 'DIR' has no member named
'current'
59 | FindClose (dirp->current);
|
```
commands:
```
tar xf gdb-13.2.tar.xz
cd gdb-13.2 && mkdir build && cd build
CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ ../configure
--prefix=$PWD/prefix --build=x86_64-linux-gnu --host=i686-w64-mingw32
make V=1
```
This is on Fedora 38
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug build/31050] Compile error in gnulib/import/closedir.c
2023-11-10 23:04 [Bug build/31050] New: Compile error in gnulib/import/closedir.c madebr at gmail dot com
@ 2023-11-10 23:18 ` simark at simark dot ca
2023-11-10 23:28 ` madebr at gmail dot com
1 sibling, 0 replies; 3+ messages in thread
From: simark at simark dot ca @ 2023-11-10 23:18 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31050
Simon Marchi <simark at simark dot ca> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |simark at simark dot ca
--- Comment #1 from Simon Marchi <simark at simark dot ca> ---
I gave it a try (on Arch Linux, not Fedora) and I don't see it.
Your error happens in a !HAVE_CLOSEDIR path. Whereas in my build,
HAVE_CLOSEDIR is defined:
/* Define to 1 if you have the `closedir' function. */
#define HAVE_CLOSEDIR 1
Can you check in build/gnulib/config.log, what happened when gnulib probed for
closedir? In my case, I see:
configure:23178: checking for closedir
configure:23178: i686-w64-mingw32-gcc -o conftest.exe -g -O2
-Wl,--stack,12582912 conftest.c >&5
configure:23178: $? = 0
configure:23178: result: yes
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug build/31050] Compile error in gnulib/import/closedir.c
2023-11-10 23:04 [Bug build/31050] New: Compile error in gnulib/import/closedir.c madebr at gmail dot com
2023-11-10 23:18 ` [Bug build/31050] " simark at simark dot ca
@ 2023-11-10 23:28 ` madebr at gmail dot com
1 sibling, 0 replies; 3+ messages in thread
From: madebr at gmail dot com @ 2023-11-10 23:28 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31050
--- Comment #2 from maarten <madebr at gmail dot com> ---
It contains the following:
configure:23178: checking for closedir
configure:23178: i686-w64-mingw32-gcc -o conftest.exe -g -O2
-Wl,--stack,12582912 conftest.c >&5
/usr/lib/gcc/i686-w64-mingw32/12.2.1/../../../../i686-w64-mingw32/bin/ld:
/usr/i686-w64-mingw32/sys-root/mingw/lib/../lib/libmingwex.a(lib32_libmingwex_a-dirent.o):(.text+0x22f):
undefined reference to `__strcpy_chk'
collect2: error: ld returned 1 exit status
I have encountered this issue before with the Fedora mingw toolchains.
I need to add -lssp to LDFLAGS.
Thanks for pointing me in the correct direction.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-11-10 23:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-10 23:04 [Bug build/31050] New: Compile error in gnulib/import/closedir.c madebr at gmail dot com
2023-11-10 23:18 ` [Bug build/31050] " simark at simark dot ca
2023-11-10 23:28 ` madebr at gmail dot com
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).