Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configure: error: tbb include file (tbb.h) not found #3055

Open
alphanoobmeric opened this issue Jan 2, 2024 · 17 comments
Open

configure: error: tbb include file (tbb.h) not found #3055

alphanoobmeric opened this issue Jan 2, 2024 · 17 comments
Labels
build issue platform specific issues involving compiling M2, generating examples, or running tests high-performance computing

Comments

@alphanoobmeric
Copy link

I'm attempting to compile M2 on multiple RHEL 8 machines and keep running into issues:

[root@host M2]# ./configure --enable-download
configure: configuring Macaulay2 version 1.22
relevant environment variable values, if any:
configure: operating system information:
   OS    = Linux
   ISSUE = RedHatEnterprise-8.9
checking for gmake... gmake
checking for pkg-config... pkg-config
checking for etags... etags
checking for lintian... no
checking for otool... no
checking for rpmlint... no
checking for gtar... gtar
checking for gfind... no
checking for find... find
checking for objdump... objdump
checking for objcopy... objcopy
checking for ldd... ldd
checking for git... git
checking for ar... ar
checking for as... as
checking for dlltool... no
checking for ld... ld
checking for strip... strip
checking whether strip accepts the remove-section option... yes
checking whether gmake is GNU make... yes
checking whether GNU make is recent enough... yes
checking whether gtar is GNU tar... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for bison... bison -y
checking for ranlib... ranlib
checking for a BSD-compatible install... /bin/install -c
checking for gawk... gawk
checking for gcc version... 8
checking whether exceptions are caught... yes
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking size of int *... 8
checking size of long... 8
checking for sys/time.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking for sys/time.h... (cached) yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking sys/wait.h usability... yes
checking sys/wait.h presence... yes
checking for sys/wait.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking io.h usability... no
checking io.h presence... no
checking for io.h... no
checking linux/personality.h usability... yes
checking linux/personality.h presence... yes
checking for linux/personality.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdint.h... (cached) yes
checking for inttypes.h... (cached) yes
checking elf.h usability... yes
checking elf.h presence... yes
checking for elf.h... yes
checking execinfo.h usability... yes
checking execinfo.h presence... yes
checking for execinfo.h... yes
checking for stdlib.h... (cached) yes
checking syscall.h usability... yes
checking syscall.h presence... yes
checking for syscall.h... yes
checking for sys/types.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking for unistd.h... (cached) yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking assert.h usability... yes
checking assert.h presence... yes
checking for assert.h... yes
checking alloca.h usability... yes
checking alloca.h presence... yes
checking for alloca.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking winsock2.h usability... no
checking winsock2.h presence... no
checking for winsock2.h... no
checking for library containing clock_gettime... none required
checking for library containing socket... none required
checking for library containing hstrerror... none required
checking for library containing dlopen... -ldl
checking for library containing gethostbyname... none required
checking tbb/tbb.h usability... no
checking tbb/tbb.h presence... no
checking for tbb/tbb.h... no
configure: error: tbb include file (tbb.h) not found

I seem to have tbb already installed, but not sure what the issue is. I've very little experience with compiling or using make to use software.
What should be my next steps? I seem to already have tbb:
Package tbb-2018.2-9.el8.x86_64 is already installed.

@d-torrance
Copy link
Member

Macaulay2 requires at least TBB 2020. Try installing a newer TBB first: https://github.com/oneapi-src/oneTBB/blob/master/INSTALL.md

@alphanoobmeric
Copy link
Author

alphanoobmeric commented Jan 3, 2024

That makes sense. Where should the files need to end up for M2 to be happy? I tried setting "-DCMAKE_INSTALL_PREFIX=" from the tbb INSTALL instructions to my M2 directory where I am running ./configure. I've tried placing tbb in the "include" directory as well, but it still doesn't see tbb.h. I guess what I am asking is where does this check for tbb.h?

@d-torrance
Copy link
Member

It likely checks in directories like /usr/include/ and /usr/local/include. If it's installed elsewhere, then you can add -I<dir> to the CPPFLAGS variable.

So for example, let's say you installed the TBB header files to something like /my/tbb/headers, e.g. the file /my/tbb/headers/tbb/tbb.h exists on your system. Then if you run ./configure CPPFLAGS="-I/my/tbb/headers", it should find it.

@alphanoobmeric
Copy link
Author

alphanoobmeric commented Jan 3, 2024

Ah, okay! That worked! However, I then run into:
checking whether package libffi is provided... no configure: error: install libffi or use --without-libffi option

Using the --without-libffi option, as it says, it gets to this strange error:
checking whether getaddrinfo can handle numeric service (port) numbers... configure: error: test file failed to compile

EDIT: Guess I should mention I have libffi-3.1-24.el8.x86_64 installed.

@d-torrance
Copy link
Member

It's definitely fine to compile using --without-libffi, so I wouldn't worry too much about that.

The next error is strange! What happens if you try compiling the following simple little C program?

#include <stdio.h>
#include <netdb.h>

int main(void)
{
  struct addrinfo *addr;
  printf("%d\n", getaddrinfo("1.2.3.4", "80", 0, &addr));
  return 0;
}

You could save it as something like test.c, then run gcc test.c -o test, and then ./test. It should print a number -- what does it print?

@alphanoobmeric
Copy link
Author

alphanoobmeric commented Jan 3, 2024

Ran the above and it returns 0, so it seems to work. I found the similar section of the configure file and was looking at that.

       int main(void) {
       struct addrinfo *addr;
       return 0 != getaddrinfo("1.2.3.4", "80", 0, &addr) ? 99 : 0 ;
       } 

If I'm reading this right, this ought to return 0, but is returning 99?

@d-torrance
Copy link
Member

I think if getaddrinfo returns anything other than 0, then this little program that configure compiles will return 99.

Can you attach the config.log file? Perhaps something in it can shed some light on what's going on.

@alphanoobmeric
Copy link
Author

alphanoobmeric commented Jan 3, 2024

Here you go. I am, probably unwisely, running make after bypassing that section of code. (I simply edited the following if statement from "!= 99" to "= 99".) It seems to be working, but I'd definitely would prefer to know why it fails since i have no idea what the purpose is for the getaddrinfo test.

I intend to install this on other identical machines. I saw an option for "--enable-rpm" in the configure help and would be attempting that if I can get this to work.

config.log

@d-torrance
Copy link
Member

Ah, ok! I don't think this has anything to do with getaddrinfo -- that check coincidentally is just the first time it tries actually running a program that was supposedly linked against the TBB library, so we're getting the following:

configure:14447: checking whether getaddrinfo can handle numeric service (port) numbers
configure:14476: gcc -o conftest -std=gnu11 -g3 -O2 -isystem /usr/include/libxml2   -DNDEBUG -I/usr/include/eigen3  -I/usr/include -DBOOST_STACKTRACE_LINK  -g3 -L/usr/lib64 conftest.c -lxml2 -llzma -lz  -L/usr/lib/gcc/x86_64-redhat-linux/8 -L/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/8/../../.. -ltbb -ldl -lgfortran -lm -lquadmath -lquadmath -lreadline -lcurses -lmpfr -lgmpxx -lgmp -lgdbm -lpthread -ltbb -ldl  -lboost_stacktrace_addr2line -lboost_regex >&5
configure:14476: $? = 0
configure:14476: ./conftest
./conftest: error while loading shared libraries: libtbb.so.12: cannot open shared object file: No such file or directory
configure:14476: $? = 127

So similar to using CPPFLAGS above, you could set LIBS to include -L<dir> to specify the directory containing libtbb.so. So ./configure CPPFLAGS="-I/path/to/tbb/headers" LIBS="-L/path/to/tbb/shared/library".

I also noticed that it's going to try building a lot of dependencies:

configure:14856: using BUILDLIBLIST  =  atomic_ops gc mpfi readline ntl flint factory lapack mpsolve frobby glpk cddlib gtest
configure:14858: using BUILDSUBLIST  =  memtailor mathic mathicgb fflas_ffpack givaro
configure:14860: using BUILDPROGLIST =  4ti2 gfan normaliz csdp nauty lrslib gftables topcom cohomcalg

If you can find rpm's of any of those and install those ahead of time, then that will also simplify things. There's a list in the Macaulay2 INSTALL file, but I'm not sure how up-to-date it is:

M2/M2/INSTALL

Lines 136 to 142 in 86d6c70

CentOS 8 (covers Red Hat Enterprise Linux):
Install packages with:
-- from the standard repository:
sudo dnf install -y autoconf bison blas boost-devel emacs flex gc gcc-c++ gcc-gfortran gdbm-devel git-all gmp-devel lapack libatomic_ops libmpc libtool libxml2-devel make mpfr-devel ncurses-devel readline-devel redhat-lsb rpm-build rpm-sign time wget xz-devel zlib-devel
-- from the PowerTools repository
sudo dnf config-manager --set-enabled PowerTools
sudo dnf install -y eigen3-devel gtest texinfo yasm

@mahrud
Copy link
Member

mahrud commented Jan 5, 2024

Can you install brew on RHEL?

@alphanoobmeric
Copy link
Author

Can you install brew on RHEL?

Never used it before, but have heard of it. It looks like it's a possibility. The end goal is to have a repeatable method of deploying Macaulay2 since we've got a bunch of machines with multiple users who will be wanting to install it. Preferably in some way that an Ansible playbook could handle.

If you can find rpm's of any of those and install those ahead of time, then that will also simplify things. There's a list in the Macaulay2 INSTALL file, but I'm not sure how up-to-date it is:

I've got all the packages installed it seems like, but must be missing something:

Package autoconf-2.69-29.el8.noarch is already installed.
Package bison-3.0.4-10.el8.x86_64 is already installed.
Package blas-3.8.0-8.el8.x86_64 is already installed.
Package boost-devel-1.66.0-13.el8.x86_64 is already installed.
Package emacs-1:26.1-11.el8.x86_64 is already installed.
Package flex-2.6.1-9.el8.x86_64 is already installed.
Package gc-7.6.4-3.el8.x86_64 is already installed.
Package gcc-c++-8.5.0-20.el8.x86_64 is already installed.
Package gcc-gfortran-8.5.0-20.el8.x86_64 is already installed.
Package gdbm-devel-1:1.18-2.el8.x86_64 is already installed.
Package git-all-2.39.3-1.el8_8.noarch is already installed.
Package gmp-devel-1:6.1.2-10.el8.x86_64 is already installed.
Package lapack-3.8.0-8.el8.x86_64 is already installed.
Package libatomic_ops-7.6.2-3.el8.x86_64 is already installed.
Package libmpc-1.1.0-9.1.el8.x86_64 is already installed.
Package libtool-2.4.6-25.el8.x86_64 is already installed.
Package libxml2-devel-2.9.7-16.el8_8.1.x86_64 is already installed.
Package make-1:4.2.1-11.el8.x86_64 is already installed.
Package mpfr-devel-3.1.6-1.el8.x86_64 is already installed.
Package ncurses-devel-6.1-10.20180224.el8.x86_64 is already installed.
Package readline-devel-7.0-10.el8.x86_64 is already installed.
Package redhat-lsb-4.1-47.el8.x86_64 is already installed.
Package rpm-build-4.14.3-26.el8.x86_64 is already installed.
Package rpm-sign-4.14.3-26.el8.x86_64 is already installed.
Package time-1.9-3.el8.x86_64 is already installed.
Package wget-1.19.5-11.el8.x86_64 is already installed.
Package xz-devel-5.2.4-4.el8_6.x86_64 is already installed.
Package zlib-devel-1.2.11-25.el8.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete! 

Package eigen3-devel-3.3.4-6.el8.noarch is already installed.
Package gtest-1.8.0-5.el8.x86_64 is already installed.
Package texinfo-6.5-7.el8.x86_64 is already installed.
Package yasm-1.3.0-7.el8.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!

I still can't succeed with compiling, and the From what I can tell, gcc looks in these directories when I execute dummy compile command I found:

echo "#include <bogus.h>" | gcc -v -x c - 
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/8/include-fixed"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/8/../../../../x86_64-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/x86_64-redhat-linux/8/include
 /usr/local/include
 /usr/include

I've tried placing tbb and gcc libraries directly in /usr/local/lib. I've tried putting the headers or symlinks in the above include directories as well, but it seems like it still can't find them.

@mahrud
Copy link
Member

mahrud commented Jan 5, 2024

The end goal is to have a repeatable method of deploying Macaulay2 since we've got a bunch of machines with multiple users who will be wanting to install it.

Ah, then brew might not be very optimal.

Have you tried the CMake build? (See INSTALL-CMake.md)

Also, I think @antonleykin has built M2 on RHEL before.

@mahrud mahrud added the build issue platform specific issues involving compiling M2, generating examples, or running tests label Jan 15, 2024
@alphanoobmeric
Copy link
Author

alphanoobmeric commented Jan 18, 2024

Sorry for not following up. I've been running down other issues. I think I'll start over on a blank RHEL8 box and try fresh using cmake steps. Will follow up with what I run into.

@alphanoobmeric
Copy link
Author

I've had a little time and started over with a fresh RHEL 8 box that I can revert snapshots on at will. There's nothing on this other than me trying to run this compile. When I run the "INSTALL" instructions I get to the gcc make step and run into issues:

/home/cosam/M2/M2/gcc-7.1.0-build/./gcc/xgcc -B/home/cosam/M2/M2/gcc-7.1.0-build/./gcc/ -B/home/cosam/local/x86_64-pc-linux-gnu/bin/ -B/home/cosam/local/x86_64-pc-linux-gnu/lib/ -isystem /home/cosam/local/x86_64-pc-linux-gnu/include -isystem /home/cosam/local/x86_64-pc-linux-gnu/sys-include    -g -O2 -O2  -g -O2 -DIN_GCC    -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -fpic -mlong-double-80 -DUSE_ELF_SYMVER -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -fpic -mlong-double-80 -DUSE_ELF_SYMVER -I. -I. -I../.././gcc -I../../../gcc-7.1.0/libgcc -I../../../gcc-7.1.0/libgcc/. -I../../../gcc-7.1.0/libgcc/../gcc -I../../../gcc-7.1.0/libgcc/../include -I../../../gcc-7.1.0/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS  -DUSE_TLS -o unwind-dw2.o -MT unwind-dw2.o -MD -MP -MF unwind-dw2.dep -fexceptions -c ../../../gcc-7.1.0/libgcc/unwind-dw2.c -fvisibility=hidden -DHIDE_EXPORTS                                            
In file included from ../../../gcc-7.1.0/libgcc/unwind-dw2.c:403:0:                                                                
./md-unwind-support.h: In function ‘x86_64_fallback_frame_state’:
./md-unwind-support.h:65:47: error: dereferencing pointer to incomplete type ‘struct ucontext’                                     
       sc = (struct sigcontext *) (void *) &uc_->uc_mcontext;
                                               ^~
make[3]: *** [../../../gcc-7.1.0/libgcc/shared-object.mk:14: unwind-dw2.o] Error 1                                                 
make[3]: Leaving directory '/home/cosam/M2/M2/gcc-7.1.0-build/x86_64-pc-linux-gnu/libgcc'                                          
make[2]: *** [Makefile:21950: all-stage1-target-libgcc] Error 2
make[2]: Leaving directory '/home/cosam/M2/M2/gcc-7.1.0-build'
make[1]: *** [Makefile:26731: stage1-bubble] Error 2
make[1]: Leaving directory '/home/cosam/M2/M2/gcc-7.1.0-build'
make: *** [Makefile:942: all] Error 2

I will attempt to do CMAKE instead and see if that goes better. I attempted linuxbrew without much luck before building this VM to test.

@alphanoobmeric
Copy link
Author

alphanoobmeric commented Jan 23, 2024

For my CMAKE attempt, I wind up running into TBB and other issues again. I'm doing nothing outside the instructions other than running "dnf install gcc gcc-c++ openssl-devel git gtest texlive-latex" and running make for compiling CMAKE itself.

## Configure Macaulay2
     M2 version        = 1.22.0.1
     Git description   = version-1.22.0.1-456-776fd94fa
     Install prefix    = /usr

     CMAKE_BUILD_TYPE  = Release
     BUILD_NATIVE      = ON
     BUILD_SHARED_LIBS = OFF
     BUILD_TESTING     = ON
     BUILD_DOCS        = OFF

     COVERAGE          = OFF
     MEMDEBUG          = OFF
     PROFILING         = OFF

     DEVELOPMENT       = OFF
     EXPERIMENT        = OFF
## could not recognize issue flavor: 

## Host OS information
     ISSUE             = -
     NODENAME          = csm-prom-rhel-2.auburn.edu
     OS REL            = Linux 4.18.0-513.11.1.el8_9.x86_64
     ARCH              = x86_64

## Staging area prefixes
     usr-host          = /home/cosam/Downloads/M2/M2/BUILD/build/usr-host
     common            = /home/cosam/Downloads/M2/M2/BUILD/build/usr-dist/common
     exec              = /home/cosam/Downloads/M2/M2/BUILD/build/usr-dist/x86_64-Linux--

## Compiler information
     C                 = GNU 8.5.0 (/bin/cc)
     C++               = GNU 8.5.0 (/bin/c++)
     Ccache            = 

## CMake path variables
     CMAKE_PREFIX_PATH
       /home/cosam/Downloads/M2/M2/BUILD/build/usr-host
     CMAKE_SYSTEM_PREFIX_PATH
       /home/cosam/Downloads/M2/M2/BUILD/build/usr-host;/usr/local;/usr;/;/usr/local;/usr;/usr/X11R6;/usr/pkg;/opt
     CMAKE_C_IMPLICIT_LINK_DIRECTORIES
       /usr/lib/gcc/x86_64-redhat-linux/8;/usr/lib64;/lib64;/usr/lib

--  Checking for existing libraries and programs
-- Could NOT find TBB (missing: TBB_DIR)
-- Could NOT find Eigen3 (missing: Eigen3_DIR)
-- Could NOT find BDWGC (missing: BDWGC_INCLUDE_DIR BDWGC_LIBRARIES BDWGC_VERSION_OK BDWGC_CXX_SUPPORT) (Required is at least version "7.6.4")
-- Could NOT find MPFR (missing: MPFR_ROOT MPFR_INCLUDE_DIRS MPFR_LIBRARIES MPFR_VERSION_OK) (Required is at least version "4.0.1")
-- Could NOT find MPFI (missing: MPFI_INCLUDE_DIR MPFI_LIBRARIES MPFI_VERSION_OK) (Required is at least version "1.5.1")
-- Could NOT find NTL (missing: NTL_ROOT NTL_INCLUDE_DIR NTL_LIBRARIES NTL_VERSION_OK) (Required is at least version "10.5.0")
-- Could NOT find Flint (missing: FLINT_ROOT FLINT_INCLUDE_DIR FLINT_LIBRARIES FLINT_VERSION_OK) (Required is at least version "2.6.0")
-- Could NOT find Factory (missing: FACTORY_INCLUDE_DIR FACTORY_LIBRARIES FACTORY_VERSION_OK) (Required is at least version "4.2.0")
-- Could NOT find MPSolve (missing: MPSOLVE_INCLUDE_DIR MPSOLVE_LIBRARIES MPSOLVE_VERSION_OK) (Required is at least version "3.2.0")
-- Could NOT find MSolve (missing: MSOLVE_INCLUDE_DIR MSOLVE_LIBRARIES) (Required is at least version "0.4.0")
-- Could NOT find Frobby (missing: FROBBY_INCLUDE_DIR FROBBY_LIBRARIES) (Required is at least version "0.9.0")
-- Could NOT find CDDLIB (missing: CDDLIB_ROOT CDDLIB_INCLUDE_DIR CDDLIB_LIBRARY_DIR CDDLIB_LIBRARIES) 
-- Could NOT find GTest (missing: GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY) (Required is at least version "1.10")
-- Could NOT find GLPK (missing: GLPK_ROOT GLPK_INCLUDE_DIR GLPK_LIBRARIES) (Required is at least version "4.59.0")
-- Checking for one of the modules 'fflas-ffpack>=2.4.3'
-- Checking for one of the modules 'givaro>=4.1.1'
--  Checking library compatibility
--  Checking library compatibility -  Libraries are compatible!
-- Submodule update
--  Checking for existing libraries and programs -  Some components are missing
## Before building Macaulay2, rerun build-libraries and build-programs targets
## External components
     Need to build:
       Libraries       = bdwgc;eigen;factory;fflas_ffpack;flint;frobby;givaro;glpk;googletest;mpfi;mpfr;mpsolve;ntl
       Programs        = 4ti2;cohomcalg;csdp;gfan;lrslib;nauty;normaliz;topcom
     Already built:
       Libraries       = N/A
       Programs        = N/A

## Library information
     Linear Algebra    = /usr/lib64/libopenblas.so;-lpthread;-lm;-ldl
     MP Arithmetic     = /usr/lib64/libgmpxx.so;/usr/lib64/libgmp.so
     Optional libs     = OMP TBB FFI XML

-- Could NOT find GTest (missing: GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY) 
CMake Deprecation Warning at BUILD/build/_deps/googletest-src/CMakeLists.txt:4 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


CMake Deprecation Warning at BUILD/build/_deps/googletest-src/googlemock/CMakeLists.txt:45 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


CMake Deprecation Warning at BUILD/build/_deps/googletest-src/googletest/CMakeLists.txt:56 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Could NOT find GTest (missing: GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY) 
-- Could NOT find GTest (missing: GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY) 
-- Could NOT find LATEX (missing: BIBTEX) 
-- Configuring done (5.0s)
-- Generating done (0.2s)
-- Build files have been written to: /home/cosam/Downloads/M2/M2/BUILD/build

My attempt to dnf install tbb shows:
Package tbb-2018.2-9.el8.x86_64 is already installed.

Listing the /usr/include/tbb/ directory shows:

aggregator.h                  critical_section.h            parallel_invoke.h             task_group.h
aligned_space.h               enumerable_thread_specific.h  parallel_reduce.h             task.h
atomic.h                      flow_graph_abstractions.h     parallel_scan.h               task_scheduler_init.h
blocked_range2d.h             flow_graph.h                  parallel_sort.h               task_scheduler_observer.h
blocked_range3d.h             flow_graph_opencl_node.h      parallel_while.h              tbb_allocator.h
blocked_range.h               gfx_factory.h                 partitioner.h                 tbb_config.h
cache_aligned_allocator.h     global_control.h              pipeline.h                    tbb_disable_exceptions.h
combinable.h                  internal/                     queuing_mutex.h               tbb_exception.h
compat/                       machine/                      queuing_rw_mutex.h            tbb.h
concurrent_hash_map.h         memory_pool.h                 reader_writer_lock.h          tbb_machine.h
concurrent_lru_cache.h        mutex.h                       recursive_mutex.h             tbbmalloc_proxy.h
concurrent_priority_queue.h   null_mutex.h                  runtime_loader.h              tbb_profiling.h
concurrent_queue.h            null_rw_mutex.h               scalable_allocator.h          tbb_stddef.h
concurrent_unordered_map.h    parallel_do.h                 spin_mutex.h                  tbb_thread.h
concurrent_unordered_set.h    parallel_for_each.h           spin_rw_mutex.h               tick_count.h
concurrent_vector.h           parallel_for.h                task_arena.h                  

@alphanoobmeric
Copy link
Author

Okay, so looking at it again, I see that the CMAKE version also wants TBB and I've been trying to narrow down these dependencies.

-- Could NOT find TBB (missing: TBB_DIR)
-- Could NOT find BDWGC (missing: BDWGC_INCLUDE_DIR BDWGC_LIBRARIES BDWGC_VERSION_OK BDWGC_CXX_SUPPORT) (Required is at least version "7.6.4")
-- Could NOT find MPFR (missing: MPFR_ROOT MPFR_INCLUDE_DIRS MPFR_LIBRARIES MPFR_VERSION_OK) (Required is at least version "4.0.1")
-- Could NOT find MPFI (missing: MPFI_INCLUDE_DIR MPFI_LIBRARIES MPFI_VERSION_OK) (Required is at least version "1.5.1")
-- Could NOT find NTL (missing: NTL_ROOT NTL_INCLUDE_DIR NTL_LIBRARIES NTL_VERSION_OK) (Required is at least version "10.5.0")
-- Could NOT find Flint (missing: FLINT_ROOT FLINT_INCLUDE_DIR FLINT_LIBRARIES FLINT_VERSION_OK) (Required is at least version "2.6.0")
-- Could NOT find Factory (missing: FACTORY_INCLUDE_DIR FACTORY_LIBRARIES FACTORY_VERSION_OK) (Required is at least version "4.2.0")
-- Could NOT find MPSolve (missing: MPSOLVE_INCLUDE_DIR MPSOLVE_LIBRARIES MPSOLVE_VERSION_OK) (Required is at least version "3.2.0")
-- Could NOT find MSolve (missing: MSOLVE_INCLUDE_DIR MSOLVE_LIBRARIES) (Required is at least version "0.4.0")
-- Could NOT find CDDLIB (missing: CDDLIB_ROOT CDDLIB_INCLUDE_DIR CDDLIB_LIBRARY_DIR CDDLIB_LIBRARIES) 
-- Could NOT find GLPK (missing: GLPK_ROOT GLPK_INCLUDE_DIR GLPK_LIBRARIES) (Required is at least version "4.59.0")

So, I'm not sure how I got tbb 2020 on my original machine. Possibly via pip. For my current VM, I'm trying to start clean and maybe I'm over complicating this. I'm attempting to use rpmbuild with the Fedora 38 source rpm.

Installing tbb-2020.3-16.fc38.src.rpm
warning: user mockbuild does not exist - using root
warning: group mock does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mock does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mock does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mock does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mock does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mock does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mock does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mock does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mock does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mock does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mock does not exist - using root
error: Failed build dependencies:
        python-setuptools is needed by tbb-2020.3-16.el8.x86_64

I've eliminated all dependencies for this TBB rebuild except this. So, if doing a rpmbuild --rebuild of the srpm is a bad idea, let me know now. Otherwise, that's what I'm trying to figure out.

@mahrud
Copy link
Member

mahrud commented Sep 19, 2024

It seems that following the instructions in https://github.com/oneapi-src/oneTBB/blob/master/INSTALL.md was helpful in building TBB and then M2 on RHEL8.1: #3485. Does this work for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build issue platform specific issues involving compiling M2, generating examples, or running tests high-performance computing
Projects
None yet
Development

No branches or pull requests

3 participants