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

Intel Build Error cannot see libg2c.a (or libg2c.a missing components) #346

Open
wjcapehart opened this issue Sep 6, 2024 · 2 comments
Open

Comments

@wjcapehart
Copy link

Hello All

I have a build error at the first "cmake" level using the Intel openapi compilers (2024.2 base & HPC toolkits).

I had installed the NCEPLIBS-g2 and NCEPLIBS-g2c and other prerequisites before this with no errors and successful tests and installs.

The output is provided below.

cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local  -DCMAKE_PREFIX_PATH=/usr/local;/usr/local/bin;/usr/local/lib;/usr/local/include 
-- The C compiler identification is IntelLLVM 2024.2.1
-- The Fortran compiler identification is IntelLLVM 2024.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/intel/oneapi/compiler/2024.2/bin/icx - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /opt/intel/oneapi/compiler/2024.2/bin/ifx - skipped
-- Setting build type to 'Release' as none was specified.
-- Found JPEG: /usr/local/lib/libjpeg.so (found version "90") 
-- Found Jasper: /usr/local/lib/libjasper.so (found suitable version "4.2.4", minimum required is "2.0.25") 
-- Found ZLIB: /usr/local/lib/libz.so (found version "1.3.1")  
-- Found PNG: /usr/local/lib/libpng.so (found version "1.6.43") 
-- Found bacio: /usr/local/lib/libbacio.a (found version "2.6.0")
-- Looking for Fortran sgemm
-- Looking for Fortran sgemm - not found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Looking for Fortran sgemm
-- Looking for Fortran sgemm - found
-- Found BLAS: /opt/intel/oneapi/mkl/2024.2/lib/libmkl_intel_lp64.so;/opt/intel/oneapi/mkl/2024.2/lib/libmkl_intel_thread.so;/opt/intel/oneapi/mkl/2024.2/lib/libmkl_core.so;/opt/intel/oneapi/compiler/2024.2/lib/libiomp5.so;-lm;-ldl  
-- Looking for Fortran cheev
-- Looking for Fortran cheev - found
-- Found LAPACK: /opt/intel/oneapi/mkl/2024.2/lib/libmkl_intel_lp64.so;/opt/intel/oneapi/mkl/2024.2/lib/libmkl_intel_thread.so;/opt/intel/oneapi/mkl/2024.2/lib/libmkl_core.so;/opt/intel/oneapi/compiler/2024.2/lib/libiomp5.so;-lm;-ldl;-lm;-ldl  
-- Found ip: /usr/local/lib/libip_4.a (found version "5.1.0")
-- Found bacio: /usr/local/lib/libbacio.a (found version "2.6.0")
-- Found w3emc: /usr/local/lib/libw3emc_4.a (found version "2.12.0")
-- Found g2: /usr/local/lib/libg2_4.a (found version "3.5.1")
-- Using bacio library bacio
-- In cnvgrib using bacio library bacio
-- In cnvgrib /usr/local/lib/libjasper.so;/usr/local/lib/libjpeg.so
-- In cnvgrib /usr/local/lib/libz.so
-- g2c_compare not found.
-- Configuring done (2.4s)
CMake Error at /usr/local/lib/cmake/g2/g2-targets.cmake:61 (set_target_properties):
  The link interface of target "g2::g2_4" contains:

    g2c::g2c

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  /usr/local/lib/cmake/g2/g2-config.cmake:34 (include)
  CMakeLists.txt:47 (find_package)


CMake Error at /usr/local/lib/cmake/g2/g2-targets.cmake:69 (set_target_properties):
  The link interface of target "g2::g2_d" contains:

    g2c::g2c

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  /usr/local/lib/cmake/g2/g2-config.cmake:34 (include)
  CMakeLists.txt:47 (find_package)


-- Generating done (0.0s)
CMake Generate step failed.  Build files cannot be regenerated correctly.
bash: /usr/local/bin: Is a directory
bash: /usr/local/lib: Is a directory
bash: /usr/local/include: Is a directory

Libraries libbacio.a; libpng.so /libz.so libjasper.so llibjpeg.so; libg2_4.a; libg2_d.a; libg2c.a; libw3emc_4.a & libw3emc_d.a are all present.

I am unsure if the cmake configuration script is looking for a g2c_compare.o routine in any of the files and I cannot find them in the inventories for libg2c.a, libg2_d.a, and libg2_d.a

I've included the contents of libg2c.a, libg2_d.a, and libg2_d.a and their inventories are

llibg2c.a

# ar -t /usr/local/lib/libg2c.a
cmplxpack.c.o
compack.c.o
comunpack.c.o
drstemplates.c.o
g2_addfield.c.o
g2_addgrid.c.o
g2_addlocal.c.o
g2_create.c.o
g2_free.c.o
g2_getfld.c.o
g2_gribend.c.o
g2_info.c.o
g2_miss.c.o
g2_unpack1.c.o
g2_unpack2.c.o
g2_unpack3.c.o
g2_unpack4.c.o
g2_unpack5.c.o
g2_unpack6.c.o
g2_unpack7.c.o
gbits.c.o
getdim.c.o
getpoly.c.o
gridtemplates.c.o
int_power.c.o
misspack.c.o
mkieee.c.o
pack_gp.c.o
pdstemplates.c.o
rdieee.c.o
reduce.c.o
seekgb.c.o
simpack.c.o
simunpack.c.o
specpack.c.o
specunpack.c.o
util.c.o
decenc_png.c.o
pngpack.c.o
pngunpack.c.o
decenc_jpeg2000.c.o
jpcpack.c.o
jpcunpack.c.o

libg2_4.a

# ar -t /usr/local/lib/libg2_4.a
compack.F90.o
drstemplates.F90.o
g2bytes.F90.o
g2grids.F90.o
g2get.F90.o
g2getgb2.F90.o
g2index.F90.o
g2gf.F90.o
g2unpack.F90.o
g2create.F90.o
gribmod.F90.o
gridtemplates.F90.o
intmath.F90.o
g2jpc.F90.o
pack_gp.f.o
params_ecmwf.F90.o
params.F90.o
pdstemplates.F90.o
g2png.F90.o
realloc.F90.o
reduce.f.o
g2sim.F90.o
skgb.F90.o
g2spec.F90.o
g2logging.F90.o
gdt2gds.F90.o
mova2i.c.o

and

libg2_4.d

# ar -t /usr/local/lib/libg2_d.a
compack.F90.o
drstemplates.F90.o
g2bytes.F90.o
g2grids.F90.o
g2get.F90.o
g2getgb2.F90.o
g2index.F90.o
g2gf.F90.o
g2unpack.F90.o
g2create.F90.o
gribmod.F90.o
gridtemplates.F90.o
intmath.F90.o
g2jpc.F90.o
pack_gp.f.o
params_ecmwf.F90.o
params.F90.o
pdstemplates.F90.o
g2png.F90.o
realloc.F90.o
reduce.f.o
g2sim.F90.o
skgb.F90.o
g2spec.F90.o
g2logging.F90.o
gdt2gds.F90.o
mova2i.c.o

Ideas at this point are welcome. I've exausted my unix sleuthing skills.
Bill Capehart, SD Mines

@edwardhartnett
Copy link
Contributor

I don't understand why this is not working.

g2c_compare is not needed and is not being found. It's used for extra testing and you don't need it. So that's all good. But g2c is not required for the NCEPLIBS-grib_util. So what is happening?

Are you installing the latest version: https://github.com/NOAA-EMC/NCEPLIBS-grib_util/releases/tag/v1.5.0

@Plantain
Copy link

This is not exclusive to intel. We see exactly the same with gcc/gfortran, on master and 1.5.0.
232.8 -- Found LAPACK: /usr/lib/x86_64-linux-gnu/liblapack.so;/usr/lib/x86_64-linux-gnu/libblas.so
232.8 -- Found ip: /usr/lib/x86_64-linux-gnu/libip_4.a (found version "5.1.0")
232.8 -- Found bacio: /usr/lib/x86_64-linux-gnu/libbacio.a (found version "2.6.0")
232.8 -- Found w3emc: /usr/lib/x86_64-linux-gnu/libw3emc_4.a (found version "2.12.0")
232.8 -- Found g2: /usr/lib/x86_64-linux-gnu/libg2_4.a (found version "3.5.1")
232.8 -- Using bacio library bacio
232.8 -- In cnvgrib using bacio library bacio
232.8 -- In cnvgrib /usr/lib/x86_64-linux-gnu/libjasper.so;/usr/lib/x86_64-linux-gnu/libjpeg.so
232.8 -- In cnvgrib /usr/lib/x86_64-linux-gnu/libz.so
233.8 -- g2c_compare not found.
233.8 -- Configuring done (2.3s)
233.9 CMake Error at /usr/lib/x86_64-linux-gnu/cmake/g2/g2-targets.cmake:71 (set_target_properties):
233.9 The link interface of target "g2::g2_4" contains:
233.9
233.9 g2c::g2c
233.9
233.9 but the target was not found. Possible reasons include:
233.9
233.9 * There is a typo in the target name.
233.9 * A find_package call is missing for an IMPORTED target.
233.9 * An ALIAS target is missing.
233.9
233.9 Call Stack (most recent call first):
233.9 /usr/lib/x86_64-linux-gnu/cmake/g2/g2-config.cmake:44 (include)
233.9 CMakeLists.txt:47 (find_package)
233.9
233.9
233.9 CMake Error at /usr/lib/x86_64-linux-gnu/cmake/g2/g2-targets.cmake:79 (set_target_properties):
233.9 The link interface of target "g2::g2_d" contains:
233.9
233.9 g2c::g2c
233.9
233.9 but the target was not found. Possible reasons include:
233.9
233.9 * There is a typo in the target name.
233.9 * A find_package call is missing for an IMPORTED target.
233.9 * An ALIAS target is missing.
233.9
233.9 Call Stack (most recent call first):
233.9 /usr/lib/x86_64-linux-gnu/cmake/g2/g2-config.cmake:44 (include)
233.9 CMakeLists.txt:47 (find_package)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants