Date: Sun, 04 Mar 2012 23:30:56 +0200 From: Andrey Kosachenko <andrey.kosachenko@gmail.com> To: John Baldwin <jhb@freebsd.org> Cc: svn-src-head@freebsd.org, Tijl Coosemans <tijl@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r232264 - in head/sys: amd64/include i386/include pc98/include x86/include Message-ID: <4F53DF10.5080303@gmail.com> In-Reply-To: <201203041351.22847.jhb@freebsd.org> References: <201202281838.q1SIcYhE082928@svn.freebsd.org> <201203041351.22847.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, On 04.03.2012 20:51, John Baldwin wrote: > On Tuesday, February 28, 2012 01:38:34 PM Tijl Coosemans wrote: >> Author: tijl >> Date: Tue Feb 28 18:38:33 2012 >> New Revision: 232264 >> URL: http://svn.freebsd.org/changeset/base/232264 >> >> Log: >> Copy amd64 _stdint.h to x86 and merge with i386 _stdint.h. Replace >> amd64/i386/pc98 _stdint.h with stubs. >> >> Added: >> head/sys/x86/include/_stdint.h >> - copied, changed from r232259, head/sys/amd64/include/_stdint.h > > This broke C++ software (such as the audio/flac port), that #includes > <stdint.h> with __STDC_LIMIT_MACROS defined but not __STDC_CONSTANT_MACROS > defined. The problem is that you have changed UINT64_MAX and INT64_MAX to use > UINT64_C() and INT64_C(), so in this case UINT64_MAX now expands to > UINT64_C(...) which can't be resolved to a constant. > > You should be able to reproduce this via the following: > > % cat> bar.cc > #define __STDC_LIMIT_MACROS > #include<stdint.h> > % c++ -c bar.cc > > (The test to see if __WORDSIZE should be defined at the end of stdint.h trips > over this bug.) > > While you could do something like add __INT64_C() and __UINT64_C() macros that > are always defined and use them for INT64_MAX and UINT64_MAX, I think the > simplest fix is probably to just use #ifdef _LP64 tests to define INT64_MAX > and UINT64_MAX as pure constants as those are the only two macros effected. > > (I've just hardcoded those two constants on my little netbook so I can keep > building ports and that worked fine for audio/flac). As far as I can see reported issue was addressed in -r232519. However there is one more issue that might be connected to recent changes (sorry, not sure what exactly is wrong here). Attempt to build emulators/virtualbox-ose fails with the following error: --- kBuild: Compiling tstVMStructRC - /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/src/VBox/VMM/testcase/tstVMStructRC.cpp In file included from /usr/include/sys/types.h:63, from /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/include/iprt/types.h:85, from /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/include/VBox/types.h:30, from /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/src/VBox/VMM/testcase/tstVMStructRC.cpp:33: /usr/include/sys/_stdint.h:74: error: conflicting declaration 'typedef __intptr_t intptr_t' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/include/iprt/stdint.h:162: error: 'intptr_t' has a previous declaration as 'typedef long int intptr_t' /usr/include/sys/_stdint.h:78: error: conflicting declaration 'typedef __uintptr_t uintptr_t' /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/include/iprt/stdint.h:165: error: 'uintptr_t' has a previous declaration as 'typedef long unsigned int uintptr_t' kBuild: Compiling tstAsmStructsasm - /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/src/VBox/VMM/testcase/tstAsmStructsAsm.asm kBuild: Compiling tstGlobalConfig - /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/src/VBox/VMM/testcase/tstGlobalConfig.cpp kmk: *** [/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/out/freebsd.amd64/release/obj/tstVMStructRC/tstVMStructRC.o] Error 1 The failing command: @c++ -m32 -c -O2 -g -pipe -pedantic -Wshadow -Wall -Wextra -Wno-missing-field-initializers -Wno-unused -Wno-trigraphs -fdiagnostics-show-option -Wno-long-long -Wno-variadic-macros -fno-exceptions -O2 -mtune=generic -fno-omit-frame-pointer -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-strict-aliasing -fno-stack-protector -fvisibility=hidden -DVBOX_HAVE_VISIBILITY_HIDDEN -DRT_USE_VISIBILITY_DEFAULT -fvisibility-inlines-hidden -fno-rtti -O0 -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/src/VBox/VMM/include -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/src/VBox/VMM/PATM -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/include -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/out/freebsd.amd64/release -DVBOX -DVBOX_WITH_DEBUGGER -DVBOX_OSE -DVBOX_WITH_64_BITS_GUESTS -DVBOX_WITH_HARDENING -DRTPATH_APP_PRIVATE=\"/usr/local/share/virtualbox-ose\" -DRTPATH_APP_PRIVATE_ARCH=\"/usr/local/lib/virtualbox\" -DRTPATH_SHARED_LIBS=\"/usr/local/lib/virtualbox\" -DRTPATH_APP_DOCS=\"/usr/local/share/doc/virtualbox-ose\" -DRT_OS_FREEBSD -D__FREEBSD__ -DRT_ARCH_X86 -D__X86__ -DIN_RC -DHC_ARCH_BITS=64 -DGC_ARCH_BITS=64 -DIN_VMM_RC -DIN_DIS -DIN_RT_RC -DVBOX_WITH_RAW_MODE -DIPRT_DONT_USE_SYSTEM_STDINT_H -Wp,-MD,/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/out/freebsd.amd64/release/obj/tstVMStructRC/tstVMStructRC.o.dep -Wp,-MT,/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/out/freebsd.amd64/release/obj/tstVMStructRC/tstVMStructRC.o -Wp,-MP -o /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/out/freebsd.amd64/release/obj/tstVMStructRC/tstVMStructRC.o /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/src/VBox/VMM/testcase/tstVMStructRC.cpp kmk: *** Waiting for unfinished jobs.... kmk: *** Exiting with status 2 *** [do-build] Error code 2 Stop in /usr/ports/emulators/virtualbox-ose. *** [build] Error code 1 Stop in /usr/ports/emulators/virtualbox-ose. --- --- WBR, Andrey Kosachenko
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F53DF10.5080303>