Fatal error modified `<new>`

root-config --cxx --version

Sorry I thought that was a mistype.

`root-config --cxx` --version
c++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[url=https://root-forum.cern.ch/t/trouble-compiling-root-6/21722/2 building your ROOT, did you remember to keep the “source code” tree completely separate from your “build” tree (and also from the “install” tree)?[/url]

Yes I have kept them separate. Remember I also observe this issue when getting root from the yum package manager and by trying to the the binary distribution.

I’ve attached the output of cmake if it may be helpful.
configure.txt (5.85 KB)

Try the procedure (modify only ROOT_INSTALL_DIR="/opt/root/root_v6.06.06"): Trouble compiling ROOT 6

It took some time, but I used your script without changing anything. The output is attached, but the relevent piece is that the same compile error was given.

[ 38%] Generating G__IO.cxx, ../../lib/libRIO.rootmap
input_line_1:1:10: fatal error: 'new' file not found
#include <new>
         ^
/bin/sh: line 1: 26859 Segmentation fault      (core dumped) ../../bin/rootcling_tmp -f G__IO.cxx -s /tmp/root-build/lib/libRIO.so -rml libRIO.so -rmf /tmp/root-build/lib/libRIO.rootmap -I/tmp/root-6.06.06 -I/tmp/root-build/include TZIPFile.h TVirtualObject.h TVirtualCollectionIterators.h TVirtualArray.h TStreamerInfoActions.h TStreamerInfo.h TMemFile.h TMapFile.h TMakeProject.h TLockFile.h TKeyMapFile.h TKey.h TGenCollectionStreamer.h TGenCollectionProxy.h TFree.h TFilePrefetch.h TFileMerger.h TFileCacheWrite.h TFileCacheRead.h TFile.h TFPBlock.h TEmulatedMapProxy.h TEmulatedCollectionProxy.h TDirectoryFile.h TContainerConverters.h TCollectionProxyFactory.h TBufferFile.h TArchiveFile.h /tmp/root-6.06.06/io/io/inc/LinkDef.h
gmake[2]: *** [io/io/G__IO.cxx] Error 139
gmake[1]: *** [io/io/CMakeFiles/G__IO.dir/all] Error 2
gmake: *** [all] Error 2

scriptout.txt (324 KB)

It was mentioned by mato in [url]Cannot install ROOT. Make problem? that it may be related to gcc from “Developer Toolset” or “Software Collections”. How do I know if I have installed gcc from these locations? I have used the gcc-4.8.5-4.el7.x86_64 package from the CentOS 7 base repo.

I think gcc 4.8.5 is the “native” compiler on CentOS 7.

“old” RedHat “Developer Toolset”: linux.web.cern.ch/linux/devtoolset/
“new” RedHat “Software Collections”: linux.web.cern.ch/linux/scl/

I have not installed those and checking with yum it is not aware of those so I assume that is not the issue.

yum list installed centos-release-scl devtoolset-2 ... Error: No matching Packages to list

Just to make sure … in one of your previous posts, you mentioned that you “experimented” with some epel root-6.06.06 distribution. Did you make sure to “purge” all epel ROOT related packages (“root-*”) before trying to build your new ROOT?

In your “scriptout.txt”, there’s a strange “The Fortran compiler identification is unknown” message … check:
gfortran --version

BTW. Assuming that you “miss” some vital package … can you try to install “optional packages” (then you will need to build your ROOT from scratch again, i.e. removing everything that exists now).

I did go through some effort to make sure those packages were removed and yum reports that they are gone.

yum list installed root root-
Error: No matching Packages to list

I have not installed gfortran as I have no use for it and it is not listed as a dependency.

gfortran --version
bash: gfortran: command not found...

I’ve gone ahead and started to try and install all the “optional packages” using the following command. I would have preferred not to do this, but I’m willing to help try and chase down this bug.

sudo yum install gcc-gfortran openssl-devel pcre-devel \
mesa-libGL-devel mesa-libGLU-devel glew-devel ftgl-devel mysql-devel \
fftw-devel cfitsio-devel graphviz-devel \
avahi-compat-libdns_sd-devel libldap-dev python-devel \
libxml2-devel gsl-static

I’ve repeated the test using your install script and will post the results after it completes.

It seems to me that “apt-get” is for Ubuntu and similar, while for CentOS and similar it should be “yum” (and packages’ names are different).

I had mistakenly listed the apt-get command and optional dependencies instead of what I had used for CentOS from yum.

I was able to install all these optional dependencies except for gsl-static and libldap-dev as they were not found.

The results of your script still end with the same error. I’ve attached the output of the script as well.

[ 35%] Generating G__IO.cxx, ../../lib/libRIO.rootmap
input_line_1:1:10: fatal error: 'new' file not found
#include <new>
         ^
/bin/sh: line 1:  1809 Segmentation fault      (core dumped) ../../bin/rootcling_tmp -f G__IO.cxx -s /tmp/root-build/lib/libRIO.so -rml libRIO.so -rmf /tmp/root-build/lib/libRIO.rootmap -I/tmp/root-6.06.06 -I/tmp/root-build/include TZIPFile.h TVirtualObject.h TVirtualCollectionIterators.h TVirtualArray.h TStreamerInfoActions.h TStreamerInfo.h TMemFile.h TMapFile.h TMakeProject.h TLockFile.h TKeyMapFile.h TKey.h TGenCollectionStreamer.h TGenCollectionProxy.h TFree.h TFilePrefetch.h TFileMerger.h TFileCacheWrite.h TFileCacheRead.h TFile.h TFPBlock.h TEmulatedMapProxy.h TEmulatedCollectionProxy.h TDirectoryFile.h TContainerConverters.h TCollectionProxyFactory.h TBufferFile.h TArchiveFile.h /tmp/root-6.06.06/io/io/inc/LinkDef.h
gmake[2]: *** [io/io/G__IO.cxx] Error 139
gmake[1]: *** [io/io/CMakeFiles/G__IO.dir/all] Error 2
gmake: *** [all] Error 2

scriptout_optional.txt (319 KB)

You probably really want to install (for “mathmore”): gsl-devel
For some tests / tutorials you need: redhat-lsb-core
For ldap support, you need: openldap-dev

Apart from this, I don’t really see any obvious problem (well, it’s a bit strange to see “Could NOT find GIF / TIFF / PNG / JPEG” but maybe it’s not a big deal).

Let’s assume that the compiler has some bug related to optimization … try to build your ROOT from scratch again adding: -DCMAKE_BUILD_TYPE=“Debug”

I’ve installed gsl-devel, redhat-lsb-core and openldap-dev and then using your modified script (adding -DCMAKE_BUILD_TYPE=“Debug”) I’ve attempted to build ROOT 6. I again encounter the same following error. I’ve also attached the full output.

[ 34%] Generating G__IO.cxx, ../../lib/libRIO.rootmap
input_line_1:1:10: fatal error: 'new' file not found
#include <new>
         ^
/bin/sh: line 1: 31256 Segmentation fault      (core dumped) ../../bin/rootcling_tmp -f G__IO.cxx -s /tmp/root-build/lib/libRIO.so -rml libRIO.so -rmf /tmp/root-build/lib/libRIO.rootmap -I/tmp/root-6.06.06 -I/tmp/root-build/include TZIPFile.h TVirtualObject.h TVirtualCollectionIterators.h TVirtualArray.h TStreamerInfoActions.h TStreamerInfo.h TMemFile.h TMapFile.h TMakeProject.h TLockFile.h TKeyMapFile.h TKey.h TGenCollectionStreamer.h TGenCollectionProxy.h TFree.h TFilePrefetch.h TFileMerger.h TFileCacheWrite.h TFileCacheRead.h TFile.h TFPBlock.h TEmulatedMapProxy.h TEmulatedCollectionProxy.h TDirectoryFile.h TContainerConverters.h TCollectionProxyFactory.h TBufferFile.h TArchiveFile.h /tmp/root-6.06.06/io/io/inc/LinkDef.h
gmake[2]: *** [io/io/G__IO.cxx] Error 139
gmake[1]: *** [io/io/CMakeFiles/G__IO.dir/all] Error 2
gmake: *** [all] Error 2

script_debug.txt (319 KB)

Again, I cannot see any obvious problem.
However, the new “script_debug.txt” file still says:
– Build Type: RelWithDebInfo
So, did you remember to delete everything before trying to build it again?
And if yes, did you add -DCMAKE_BUILD_TYPE=“Debug” to the very first cmake call (where you configure ROOT, e.g. right before -DCMAKE_INSTALL_PREFIX=…)?

Something is still wrong with ldap … it reports “ldap library not found” … maybe you need to install also “openldap” (I assumed that it would be automatically installed as a dependency of “openldap-dev”).
In any case, “missing” ldap cannot be responsible for the current problem.

Hi,

Which compiler did you use? How did you configure the build to use that compiler (the exact invocation, please)? Could you attach your CMakeCache.txt, please?

Cheers, Axel.

Sorry for the delay, I’ve had other things to attend to and this was not a priority.

The compiler info is listed in the output scripts. GCC 4.8.5. This was on a brand new install of CentOS 7.

[quote=“ksmith”]

`root-config --cxx` --version c++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4) Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [/quote]

I’ve been following the procedure suggested by Pepe Le Pew using a script to download and make a clean build directory

I was at the step of confirming that I had properly added the cmake flag to set the build type to debug when I stepped away from this issue

[quote=“Pepe Le Pew”]Again, I cannot see any obvious problem.
However, the new “script_debug.txt” file still says:
– Build Type: RelWithDebInfo
So, did you remember to delete everything before trying to build it again?
And if yes, did you add -DCMAKE_BUILD_TYPE=“Debug” to the very first cmake call (where you configure ROOT, e.g. right before -DCMAKE_INSTALL_PREFIX=…)?

Something is still wrong with ldap … it reports “ldap library not found” … maybe you need to install also “openldap” (I assumed that it would be automatically installed as a dependency of “openldap-dev”).
In any case, “missing” ldap cannot be responsible for the current problem.[/quote]

As Axel says, attach your “CMakeCache.txt” file (plus the “exact invocations” of cmake and make).
BTW. Can this problem be related: LLVM collision with OpenGL in CentOS7