Bug#656838: oce FTBFS on Alpha: Alpha Linux is misdetected as Alpha OSF1 Unix
Michael Cree
mcree at orcon.net.nz
Sun Jan 22 03:37:45 UTC 2012
Source: oce
Version: 0.8.0-1
Severity: Normal
User: debian-alpha at lists.debian.org
Usertags: alpha
X-Debbugs-CC: debian-alpha at lists.debian.org
oce FTBFS on alpha with the error:
[ 39%] Building CXX object
adm/cmake/TKService/CMakeFiles/TKService.dir/__/__/__/src/MFT/MFT_FontManager.cxx.o
cd
/build/buildd-oce_0.8.0-1-alpha-nfIXQh/oce-0.8.0/obj-alpha-linux-gnu/adm/cmake/TKService
&& /usr/bin/c++ -DTKService_EXPORTS -D_OCC64 -DHAVE_FTGL_NEWER212
-DHAVE_CONFIG_H -DCSFDB -DOCC_CONVERT_SIGNALS -DNDEBUG -O3 -DNDEBUG
-fPIC
-I/build/buildd-oce_0.8.0-1-alpha-nfIXQh/oce-0.8.0/obj-alpha-linux-gnu/build_inc
-I/build/buildd-oce_0.8.0-1-alpha-nfIXQh/oce-0.8.0/inc
-I/build/buildd-oce_0.8.0-1-alpha-nfIXQh/oce-0.8.0/src/AlienImage
-I/build/buildd-oce_0.8.0-1-alpha-nfIXQh/oce-0.8.0/drv/AlienImage
-I/build/buildd-oce_0.8.0-1-alpha-nfIXQh/oce-0.8.0/src/Aspect
-I/build/buildd-oce_0.8.0-1-alpha-nfIXQh/oce-0.8.0/drv/Aspect
-I/build/buildd-oce_0.8.0-1-alpha-nfIXQh/oce-0.8.0/src/CGM
-I/build/buildd-oce_0.8.0-1-alpha-nfIXQh/oce-0.8.0/drv/CGM
-I/build/buildd-oce_0.8.0-1-alpha-nfIXQh/oce-0.8.0/src/Image
-I/build/buildd-oce_0.8.0-1-alpha-nfIXQh/oce-0.8.0/drv/Image
-I/build/buildd-oce_0.8.0-1-alpha-nfIXQh/oce-0.8.0/src/MFT
-I/build/buildd-oce_0.8.0-1-alpha-nfIXQh/oce-0.8.0/drv/MFT -I/bui
ld/buildd-oce_0.8.0-1-alpha-nfIXQh/oce-0.8.0/src/PS
-I/build/buildd-oce_0.8.0-1-alpha-nfIXQh/oce-0.8.0/drv/PS
-I/build/buildd-oce_0.8.0-1-alpha-nfIXQh/oce-0.8.0/src/PlotMgt
-I/build/buildd-oce_0.8.0-1-alpha-nfIXQh/oce-0.8.0/drv/PlotMgt
-I/build/buildd-oce_0.8.0-1-alpha-nfIXQh/oce-0.8.0/src/SelectBasics
-I/build/buildd-oce_0.8.0-1-alpha-nfIXQh/oce-0.8.0/drv/SelectBasics
-I/build/buildd-oce_0.8.0-1-alpha-nfIXQh/oce-0.8.0/src/TColQuantity
-I/build/buildd-oce_0.8.0-1-alpha-nfIXQh/oce-0.8.0/drv/TColQuantity
-I/build/buildd-oce_0.8.0-1-alpha-nfIXQh/oce-0.8.0/src/Viewer
-I/build/buildd-oce_0.8.0-1-alpha-nfIXQh/oce-0.8.0/drv/Viewer
-I/build/buildd-oce_0.8.0-1-alpha-nfIXQh/oce-0.8.0/src/ImageUtility
-I/build/buildd-oce_0.8.0-1-alpha-nfIXQh/oce-0.8.0/drv/ImageUtility
-I/build/buildd-oce_0.8.0-1-alpha-nfIXQh/oce-0.8.0/src/Xw
-I/build/buildd-oce_0.8.0-1-alpha-nfIXQh/oce-0.8.0/drv/Xw -o
CMakeFiles/TKService.dir/__/__/__/src/MFT/MFT_FontManager.cxx.o -c
/build/buildd-oce_0.8.0-1-alpha-
nfIXQh/oce-0.8.0/src/MFT/MFT_FontManager.cxx
/build/buildd-oce_0.8.0-1-alpha-nfIXQh/oce-0.8.0/src/MFT/MFT_FontManager.cxx:
In static member function 'static Standard_Boolean
MFT_FontManager::Read(MFT_FileRecord&)':
/build/buildd-oce_0.8.0-1-alpha-nfIXQh/oce-0.8.0/src/MFT/MFT_FontManager.cxx:2870:23:
error: 'MAP_VARIABLE' was not declared in this scope
Full build log is at:
http://buildd.debian-ports.org/status/fetch.php?pkg=oce&arch=alpha&ver=0.8.0-1&stamp=1326555718
The build error is caused by a misdetection of Alpha Linux as Alpha OSF1
Unix in inc/MFT_FileRecord.hxx beginning at line 50 with:
#if defined ( __alpha ) || ( DECOSF1 )
#include <sys/mman.h>
#define MMAP(file_addr,mmap_size,fildes) \
mmap((caddr_t) 0x1000000000,(size_t) mmap_size,PROT_READ, \
MAP_FILE | MAP_PRIVATE | MAP_VARIABLE,fildes,(off_t)
file_addr)
#define MUNMAP(mmap_addr,mmap_size) \
munmap((caddr_t) mmap_addr,(size_t) mmap_size)
#endif // __alpha
The pre-defined compiler macro __alpha is defined if the hardware is
Alpha whatever the OS and so the above code, intended only for OSF1,
gets compiled under Linux.
Maybe modifying the conditional to be something like:
#if (defined ( __alpha ) || ( DECOSF1 )) && ! defined( linux )
would fix it --- but I don't know what is the appropriate macro to
detect Linux.
I did a quick grep and check of all other defined(__alpha) occurences
and they look fine to me, but did notice issues that might affect other
architectures supported by Debian, that is, the code has the appearance
of being written with the assumption that Linux is Intel only.
Cheers
Michael.
More information about the debian-science-maintainers
mailing list