I have 2 machines i use for serving maps and raster tif/ecw files, both have been installed from gentoo: one from 2007.0 and the latter from 2008.0_beta2. I've then installed the same version of GDAL library on both servers, which is able to open and rasterize raster data from image files. In the first 2007.0 server i'm able to open > 4GB files without any problems, while in the 2008.0 one i keep gdal having troubles opening files > 4GB. Then i checked and i had to manually force -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 in make.conf in the 2008.0, thus any ebuild that do not explicitly append those flags with "append-cflags" command will have this problem in handling big files. Why the 2007.0 server have not this problem ? **** make.conf (2007.0 server - working) CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CXXFLAGS="${CFLAGS}" MAKEOPTS="-j2" **** make.conf (2008.0_beta2 server - not working without explicit defines) CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" CXXFLAGS="${CFLAGS}" CHOST="i686-pc-linux-gnu" MAKEOPTS="-j2" Could be that the different -march is setting different -D flags ? Another patch could be to explicitly append-cflag "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" to every ebuild might need to access big files (gdal for example ?) The problem is quite strange.
Could you please post `emerge --info' for both machines?
Created attachment 156623 [details] server_2007.0_emerge.info emerge --info of server 2007.0 (working without explicit large files defines)
Created attachment 156625 [details] server_2008.0_emerge.info emerge --info of server 2008.0_beta2 (not working without explicitly setting large file defines)
Does it help to use the same overlays on both? :) PORTDIR_OVERLAY="/usr/portage/local/layman/toolchain /usr/portage/local/layman/sunrise /usr/portage/local/layman/pro-audio /usr/local/portage"
i've done the opposite (reemerged gdal in the working server WITHOUT the overlays) and it is still working on it without explicitly setting anything on make.conf.
It's not about make.conf, but very likely about a profile.bashrc in one of the overlays.
but if i remove any references to the overlays and i recompile in both servers i get the same result.
Created attachment 157053 [details, diff] gdal patch, add force for large file support and oracle (if not already committed into tree)
Sorry. I still don't see how this is a bug in Gentoo - obviously one of your configuration files is appending these CFLAGS. Most likely it's one of the overlays' profile.bashrc doing it. Please reopen this bug *only* when you have done these two things: 1) find the source of the appended CFLAGS, 2) find a way to blame this on Gentoo (and not, say, your own configuration changes from a good while ago, or perhaps the configuration found in a third party overlay).
i can close this bug only if you can apply the gdal patch for large files. it seems the most proper solution right now. for me is a bug in gentoo, if it compiles gdal without setting "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" explicitly. One of the reason people use gdal is to handle large RASTER files. Not being able to open RASTER > 4GB is not good since a lot of people will. and not everybody still have some of those obscure scripts that i might have (i still can't find where after removing any reference to overlays).