[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#489357: marked as done (undefined reference to __open_2 on hurd/kfreebsd with -D_FORTIFY_SOURCE=2)

Your message dated Tue, 29 Jul 2008 03:17:08 +0000
with message-id <E1KNfi0-00041d-NK@ries.debian.org>
and subject line Bug#489357: fixed in glibc 2.7-13
has caused the Debian Bug report #489357,
regarding undefined reference to __open_2 on hurd/kfreebsd with -D_FORTIFY_SOURCE=2
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org

489357: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=489357
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Hash: SHA1

Package: g++-4.3
Version: 4.3.1-4
Severity: important

Good morning,

it seems as there's an older bug in (maybe) g++.
The package znc won't build on the following architectures:


It FTBFS with the following error message:

> i486-gnu-g++ -Wl,--export-dynamic -o znc String.o Csocket.o main.o
znc.o User.o IRCSock.o Client.o DCCBounce.o DCCSock.o Chan.o Nick.o
Server.o Modules.o MD5.o Buffer.o Utils.o FileUtils.o HTTPSock.o
Template.o -ldl -lssl -lcrypto
> znc.o: In function `CLockFile::TryExLock(CString const&, bool)':
const&, bool)]+0x6a): undefined reference to `__open_2'

How you can see at [1] it just happens with -D_FORTIFY_SOURCE=2 -
without fortify_source it's compiling, linking and working well.
So on FORTIFY_SOURCE=2 is optimizing something in a quite bad way? :)

This is at znc the evil line which causes the FTBFS:
m_fd = open(sFile.c_str(), bRw ? O_RDWR : O_RDONLY);

You can find it in Utils.h arround line 112.

The author of the software znc Uli Schlachter has written the
"testcase.cpp" where you could also test it (with some notes).

As the build logs on [1] say, this bug also exists in stable and lenny,
but I haven't got a hurd/kfreebsd stable/testing buildd.

[1]: http://buildd.debian-ports.org/status/package.php?p=znc

- --
Mit freundlichem Gruß / With kind regards,
Patrick Matthäi

E-Mail: patrick.matthaei@web.de

// Comment:
// Always if we think we are right,
// we were maybe wrong.

Version: GnuPG v1.4.9 (GNU/Linux)

/* Uli Schlachter (C) 2008 GPLv2 (who would fork a testcase anyway? :P) */
/* Compile this with -DFORTIFY_SOURCE=2 and at least -O1.
 * E.g. so:
 *   g++ -D_FORTIFY_SOURCE=2 -O2 -o test test.cpp
 * You will get a linker error about an undefined reference to __open_2
 * (and an undefined reference to i, ignore that one).
 * __open_2() is defined in /usr/include/bits/fcntl2.h which is included by
 * fcntl.h only if _FORTIFY_SOURCE is turned on and which seems to only have an
 * effect with optimization enabled (-O1 or higher).
 * I have no clue why we only get an undefined reference to __open_2() if
 * the __builtin_constant_p() in fcntl2.h / open() returns false (happens
 * here because the value of 'extern int i' is unknown).

#include <fcntl.h>

extern int i;

int main()
	int fd = open("test", i ? O_RDWR : O_RDONLY);
	return 0;

Attachment: testcase.cpp.sig
Description: Binary data

--- End Message ---
--- Begin Message ---
Source: glibc
Source-Version: 2.7-13

We believe that the bug you reported is fixed in the latest version of
glibc, which is due to be installed in the Debian FTP archive:

  to pool/main/g/glibc/glibc-doc_2.7-13_all.deb
  to pool/main/g/glibc/glibc-source_2.7-13_all.deb
  to pool/main/g/glibc/glibc_2.7-13.diff.gz
  to pool/main/g/glibc/glibc_2.7-13.dsc
  to pool/main/g/glibc/libc6-dbg_2.7-13_amd64.deb
  to pool/main/g/glibc/libc6-dev-i386_2.7-13_amd64.deb
  to pool/main/g/glibc/libc6-dev_2.7-13_amd64.deb
  to pool/main/g/glibc/libc6-i386_2.7-13_amd64.deb
  to pool/main/g/glibc/libc6-pic_2.7-13_amd64.deb
  to pool/main/g/glibc/libc6-prof_2.7-13_amd64.deb
  to pool/main/g/glibc/libc6-udeb_2.7-13_amd64.udeb
  to pool/main/g/glibc/libc6_2.7-13_amd64.deb
  to pool/main/g/glibc/libnss-dns-udeb_2.7-13_amd64.udeb
  to pool/main/g/glibc/libnss-files-udeb_2.7-13_amd64.udeb
  to pool/main/g/glibc/locales-all_2.7-13_amd64.deb
  to pool/main/g/glibc/locales_2.7-13_all.deb
  to pool/main/g/glibc/nscd_2.7-13_amd64.deb

A summary of the changes between this version and the previous one is

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 489357@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
Aurelien Jarno <aurel32@debian.org> (supplier of updated glibc package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)

Hash: SHA1

Format: 1.8
Date: Tue, 29 Jul 2008 03:09:20 +0200
Source: glibc
Binary: glibc-doc glibc-source locales locales-all nscd libc6 libc6-dev libc6-dbg libc6-prof libc6-pic libc6-udeb libc6.1 libc6.1-dev libc6.1-dbg libc6.1-prof libc6.1-pic libc6.1-udeb libc0.3 libc0.3-dev libc0.3-dbg libc0.3-prof libc0.3-pic libc0.3-udeb libc0.1 libc0.1-dev libc0.1-dbg libc0.1-prof libc0.1-pic libc0.1-udeb libc6-i386 libc6-dev-i386 libc6-sparc64 libc6-dev-sparc64 libc6-s390x libc6-dev-s390x libc6-amd64 libc6-dev-amd64 libc6-powerpc libc6-dev-powerpc libc6-ppc64 libc6-dev-ppc64 libc6-mipsn32 libc6-dev-mipsn32 libc6-mips64 libc6-dev-mips64 libc0.1-i386 libc0.1-dev-i386 libc6-sparcv9b libc6-i686 libc6-xen libc0.1-i686 libc6.1-alphaev67 libnss-dns-udeb libnss-files-udeb
Architecture: source all amd64
Version: 2.7-13
Distribution: unstable
Urgency: low
Maintainer: Aurelien Jarno <aurel32@debian.org>
Changed-By: Aurelien Jarno <aurel32@debian.org>
 glibc-doc  - GNU C Library: Documentation
 glibc-source - GNU C Library: sources
 libc0.1    - GNU C Library: Shared libraries
 libc0.1-dbg - GNU C Library: Libraries with debugging symbols
 libc0.1-dev - GNU C Library: Development Libraries and Header Files
 libc0.1-dev-i386 - GNU C Library: 32bit development libraries for AMD64
 libc0.1-i386 - GNU C Library: 32bit shared libraries for AMD64
 libc0.1-i686 - GNU C Library: Shared libraries [i686 optimized]
 libc0.1-pic - GNU C Library: PIC archive library
 libc0.1-prof - GNU C Library: Profiling Libraries
 libc0.1-udeb - GNU C Library: Shared libraries - udeb (udeb)
 libc0.3    - GNU C Library: Shared libraries
 libc0.3-dbg - GNU C Library: Libraries with debugging symbols
 libc0.3-dev - GNU C Library: Development Libraries and Header Files
 libc0.3-pic - GNU C Library: PIC archive library
 libc0.3-prof - GNU C Library: Profiling Libraries
 libc0.3-udeb - GNU C Library: Shared libraries - udeb (udeb)
 libc6      - GNU C Library: Shared libraries
 libc6-amd64 - GNU C Library: 64bit Shared libraries for AMD64
 libc6-dbg  - GNU C Library: Libraries with debugging symbols
 libc6-dev  - GNU C Library: Development Libraries and Header Files
 libc6-dev-amd64 - GNU C Library: 64bit Development Libraries for AMD64
 libc6-dev-i386 - GNU C Library: 32bit development libraries for AMD64
 libc6-dev-mips64 - GNU C Library: 64bit Development Libraries for MIPS64
 libc6-dev-mipsn32 - GNU C Library: n32 Development Libraries for MIPS64
 libc6-dev-powerpc - GNU C Library: 32bit powerpc development libraries for ppc64
 libc6-dev-ppc64 - GNU C Library: 64bit Development Libraries for PowerPC64
 libc6-dev-s390x - GNU C Library: 64bit Development Libraries for IBM zSeries
 libc6-dev-sparc64 - GNU C Library: 64bit Development Libraries for UltraSPARC
 libc6-i386 - GNU C Library: 32bit shared libraries for AMD64
 libc6-i686 - GNU C Library: Shared libraries [i686 optimized]
 libc6-mips64 - GNU C Library: 64bit Shared libraries for MIPS64
 libc6-mipsn32 - GNU C Library: n32 Shared libraries for MIPS64
 libc6-pic  - GNU C Library: PIC archive library
 libc6-powerpc - GNU C Library: 32bit powerpc shared libraries for ppc64
 libc6-ppc64 - GNU C Library: 64bit Shared libraries for PowerPC64
 libc6-prof - GNU C Library: Profiling Libraries
 libc6-s390x - GNU C Library: 64bit Shared libraries for IBM zSeries
 libc6-sparc64 - GNU C Library: 64bit Shared libraries for UltraSPARC
 libc6-sparcv9b - GNU C Library: Shared libraries [v9b optimized]
 libc6-udeb - GNU C Library: Shared libraries - udeb (udeb)
 libc6-xen  - GNU C Library: Shared libraries [Xen version]
 libc6.1    - GNU C Library: Shared libraries
 libc6.1-alphaev67 - GNU C Library: Shared libraries (EV67 optimized)
 libc6.1-dbg - GNU C Library: Libraries with debugging symbols
 libc6.1-dev - GNU C Library: Development Libraries and Header Files
 libc6.1-pic - GNU C Library: PIC archive library
 libc6.1-prof - GNU C Library: Profiling Libraries
 libc6.1-udeb - GNU C Library: Shared libraries - udeb (udeb)
 libnss-dns-udeb - GNU C Library: NSS helper for DNS - udeb (udeb)
 libnss-files-udeb - GNU C Library: NSS helper for files - udeb (udeb)
 locales    - GNU C Library: National Language (locale) data [support]
 locales-all - GNU C Library: Precompiled locale data
 nscd       - GNU C Library: Name Service Cache Daemon
Closes: 485381 486589 488734 489357 489586 489856 489906 492191
 glibc (2.7-13) unstable; urgency=low
   [ Aurelien Jarno ]
   * Update Brazilian Portuguese debconf translation, by Felipe Augusto van de
     Wiel.  Closes: #485381.
   * patches/any/cvs-getaddrinfo.diff: new patch from CVS to correctly
     initialize internal resolver structures in getaddrinfo().  Closes:
   * Update Romanian debconf translation, by Eddy Petrişor.  Closes: #488734.
   * any/cvs-tst-regex.diff: new patch from CVS to add a timeout to tst-regex.
     Closes: #489856.
   * control.in/main: build depends on gcc-4.3 (>= 4.3.0-7), remove
   * Update Swedish debconf translation, by Martin Bagge.  Closes: #492191.
   * Revert the changes to patches/hppa/cvs-atomic.diff, it was not the cause
     of the "tst-regex problem".
   * hppa/cvs-lowlevellock.diff: new patch from upstream to fix build of NPTL
     glibc on hppa.  Closes: #486589.
   [ Petr Salinger]
   * debian/sysdeps/kfreebsd.mk: also use the bsm/ directory from kernel
   * kfreebsd/local-sysdeps.diff: update to revision 2265 (from glibc-bsd).
   * Disable call to "GL(dl_wait_lookup_done)" in linuxthreads builds. Proper
     solution still have to be created. Stop crashes in mean time. See #489066.
   [ Samuel Thibault ]
   * patches/hurd-i386/cvs-MSG_NOSIGNAL.diff: New patch to implement
   * patches/hurd-i386/local-msg-nosignal.diff: Forcibly set MSG_NOSIGNAL to 0
     until pfinet gets recompiled.  Only apply on hurd-i386.
   * Use gcc-4.3 on hurd-i386.
   * patches/hurd-i386/cvs-open_2.diff: New patch to implement __open_2
     and __openat_2. Together with kfreebsd update closes: #489357.
   * patches/hurd-i386/local-pthread_types.diff: New patch to drag pthread
     types from hurd headers.  Bump the hurd-dev dependency version
   * patches/hurd-i386/cvs-fcntl-types.diff: New patch to include
     <sys/type.h> from <bits/fcntl.h> like on Linux.  Fixes a lot of FTBFS on
   * patches/hurd-i386/local-tls.diff: Resync with upstream.
   * patches/hurd-i386/local-tls-support.diff: Make tls.h also include
     <stdint.h> and <bits/libc-lock.h> include <tls.h>, like on Linux.
   * patches/hurd-i386/submitted-trivial.diff: Remove, thanks to updated tls.h.
   [ Pierre Habouzit ]
   * Cherry-pick upstream fixes with respect to locale rwlocks, merge them into
     patches/any/cvs-strerror_r.diff. Closes: #489906.
 04bf05afcad399a4bedc6e21b37cf2e9402efdd4 2540 glibc_2.7-13.dsc
 3ee8b9f5f1cef34670c148b3fe13af0cb56f504a 730544 glibc_2.7-13.diff.gz
 ccea18d5c936570617c2271c7c119d440dddc24c 1628256 glibc-doc_2.7-13_all.deb
 2b16e088458c61b914df80800235d860d6d61dfd 15990026 glibc-source_2.7-13_all.deb
 d051b0cbaaba85e9ad8d7930ea0771e07f858e02 4499050 locales_2.7-13_all.deb
 729c27b68ce52bb863103a5fc9fa122f875d3e6f 4931364 libc6_2.7-13_amd64.deb
 fe5d39fdba6a261aab3ff27de6dda62939f30df5 2499330 libc6-dev_2.7-13_amd64.deb
 bb46e1dc1c55256d1ea07b8ed07f846bb73a6091 1930008 libc6-prof_2.7-13_amd64.deb
 fbff55ba4a4759250adff99104513022953c6767 1465496 libc6-pic_2.7-13_amd64.deb
 d47c8f99e380c0cd13aac1351751d7e2f69ac908 2773998 locales-all_2.7-13_amd64.deb
 004ef9bf5c2fac77d382e18d4e7b2888ed666722 3753322 libc6-i386_2.7-13_amd64.deb
 1e7b28ab5441f3267d7c6f93457bdd9e47b4f18d 1458480 libc6-dev-i386_2.7-13_amd64.deb
 a6027eac28cecbeebba2a94adc310b93f7a1b75c 174394 nscd_2.7-13_amd64.deb
 2d9bb0fe7e0acf571e2efee46203d51d24229051 5330610 libc6-dbg_2.7-13_amd64.deb
 6049dabdada12bd004506fec02c9678c0fa49497 1107958 libc6-udeb_2.7-13_amd64.udeb
 1dea63ee3ba7bb2120b6607be11fb67cedc50f93 9416 libnss-dns-udeb_2.7-13_amd64.udeb
 376daac7cb335626365d53b05cad5f1c33f4b627 18460 libnss-files-udeb_2.7-13_amd64.udeb
 1d6782e838c775e436dea250dbc990a4a4ce125c5513a84ccf982382b8e6adc4 2540 glibc_2.7-13.dsc
 18479cb09a1844fcec2d504c6ba07631c6e2ebcd509b7a736ba11269a5b9e89f 730544 glibc_2.7-13.diff.gz
 3cd4699a0ebcac502663d51b9c9825b6e6e57d67201294538ae07cbc1c9536e2 1628256 glibc-doc_2.7-13_all.deb
 67fe8db3d861426521f8c4d7203f0c3fb53bfa839dd3c82425d1aa4d6fb64804 15990026 glibc-source_2.7-13_all.deb
 d79b9d3dc710914443917e382f695ac841328d24c4cfd1a7d025dc796acb5df6 4499050 locales_2.7-13_all.deb
 7d850082da8acc1d069f2dcd30c6ebacfc0f4c7f52b0c9f596c6629a69c9df97 4931364 libc6_2.7-13_amd64.deb
 c33734e7ff8e9f03800db9bb5e601ca70e6f869fa0b7afd0840af661e9ee6977 2499330 libc6-dev_2.7-13_amd64.deb
 bc4b0e11838124de750312b20a79342b7db2883338919c0acc97e1ae58e2265b 1930008 libc6-prof_2.7-13_amd64.deb
 f268d3412ffb144a8e76fd421aa4fd81eacd4366d962e2f3f1d37e76de652c4b 1465496 libc6-pic_2.7-13_amd64.deb
 7e8a4829441fc3fdd2b3e09c54efd5324272428427496cb7ce82e8778408f674 2773998 locales-all_2.7-13_amd64.deb
 537bc6f586b5ad673deb63569067a3a1da8f10e6f466535611cc24aa6af7747d 3753322 libc6-i386_2.7-13_amd64.deb
 95403613a58fda294895b14b68d993607eea2d571c27b6e870dbb2a5a81b87c2 1458480 libc6-dev-i386_2.7-13_amd64.deb
 8a4afdb4fcd8fe6ffabd08fe795fc69428f7bf9aebb48ad5fdb1bce689dadc71 174394 nscd_2.7-13_amd64.deb
 76d913ff379d048c9b49a2c892f650fd5c0624904de336579f865e7b076ef182 5330610 libc6-dbg_2.7-13_amd64.deb
 8299386b3208d354cad9d9aa3bb94bbcb7a652207104adcbf2183ec6314fce5c 1107958 libc6-udeb_2.7-13_amd64.udeb
 2af48c5971dee0ee114f869eb9548531b2db8a9dfc5d540c566f86ef213f46fc 9416 libnss-dns-udeb_2.7-13_amd64.udeb
 32fdc570838cd51e6bd3e3984c1c9dfe3c47dc05318849635d8a77aae7dc5262 18460 libnss-files-udeb_2.7-13_amd64.udeb
 088030fd8dcf6f9c9b5264d82b0d653f 2540 libs required glibc_2.7-13.dsc
 4ab6e046da023d636b13c274cfac2864 730544 libs required glibc_2.7-13.diff.gz
 48195bf0080441c2aff764eb230feede 1628256 doc optional glibc-doc_2.7-13_all.deb
 8082bcc15498cd9336b3af7830013bd6 15990026 devel optional glibc-source_2.7-13_all.deb
 6c4af55e16013021357dc467967493b6 4499050 libs standard locales_2.7-13_all.deb
 609a899b9248aa5410e3e40adfe9ba97 4931364 libs required libc6_2.7-13_amd64.deb
 b583ae918bfdf8282082af48c4883a57 2499330 libdevel optional libc6-dev_2.7-13_amd64.deb
 6bef2d5d22e7c6db92dc84f39e2a25c6 1930008 libdevel extra libc6-prof_2.7-13_amd64.deb
 ee9c5f52946e5b6faa68bf629e106125 1465496 libdevel optional libc6-pic_2.7-13_amd64.deb
 bc9dd8e3296acf0a24a35e19e3fa5684 2773998 libs extra locales-all_2.7-13_amd64.deb
 40d6e9dd301ba5d6785bc3ea23c84e6e 3753322 libs optional libc6-i386_2.7-13_amd64.deb
 0e3b0741f52e9a18b09c705d15972ca9 1458480 libdevel optional libc6-dev-i386_2.7-13_amd64.deb
 543784c8d744ac3e0a5360ba46475b47 174394 admin optional nscd_2.7-13_amd64.deb
 bb689851da9fd4fafc3a9db00611bd31 5330610 libdevel extra libc6-dbg_2.7-13_amd64.deb
 54caefc7a8e05349622a4f95d4d6139e 1107958 debian-installer extra libc6-udeb_2.7-13_amd64.udeb
 3177f502312620aae891dcedcef8c885 9416 debian-installer extra libnss-dns-udeb_2.7-13_amd64.udeb
 ac71ba1dd67c5c09fa039f99acdc4365 18460 debian-installer extra libnss-files-udeb_2.7-13_amd64.udeb
Package-Type: udeb

Version: GnuPG v1.4.9 (GNU/Linux)


--- End Message ---

Reply to: