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

Compiling errors relating to copygb.F #53

Closed
wyhqq opened this issue Sep 3, 2021 · 12 comments
Closed

Compiling errors relating to copygb.F #53

wyhqq opened this issue Sep 3, 2021 · 12 comments
Labels
build Building software is complicated

Comments

@wyhqq
Copy link

wyhqq commented Sep 3, 2021

In the installation of hpc-stack-DTC(with ./build_stack.sh -p /app/hpc-stacks -c config/config_comgsi.sh ), only the grib-util software is not installed successfully in hpc-stack-DTC:

the errors are as follows:

/hpc-stack-DTC/pkg/grib_util-v1.2.2/sorc/copygb.fd/copygb.F:1336: undefined reference to ipolates_' /hpc-stack-DTC/pkg/grib_util-v1.2.2/sorc/copygb.fd/copygb.F:1411: undefined reference to ipolatev_'
/hpc-stack-DTC/pkg/grib_util-v1.2.2/sorc/copygb.fd/copygb.F:1442: undefined reference to ipolatev_' /hpc-stack-DTC/pkg/grib_util-v1.2.2/sorc/copygb.fd/copygb.F:1401: undefined reference to ipolatev_'
/hpc-stack-DTC/pkg/grib_util-v1.2.2/sorc/copygb.fd/copygb.F:1342: undefined reference to ipolates_' /hpc-stack-DTC/pkg/grib_util-v1.2.2/sorc/copygb.fd/copygb.F:1379: undefined reference to ipolatev_'
/hpc-stack-DTC/pkg/grib_util-v1.2.2/sorc/copygb.fd/copygb.F:1364: undefined reference to ipolates_' /hpc-stack-DTC/pkg/grib_util-v1.2.2/sorc/copygb.fd/copygb.F:1323: undefined reference to ipolates_'
CMakeFiles/copygb.dir/copygb.F.o: In function MAIN__': /hpc-stack-DTC/pkg/grib_util-v1.2.2/sorc/copygb.fd/copygb.F:269: undefined reference to makgds_'
collect2: error: ld returned 1 exit status
make[2]: *** [sorc/copygb.fd/copygb] Error 1
make[2]: Leaving directory /hpc-stack-DTC/pkg/grib_util-v1.2.2/build' make[1]: *** [sorc/copygb.fd/CMakeFiles/copygb.dir/all] Error 2 make[1]: Leaving directory /hpc-stack-DTC/pkg/grib_util-v1.2.2/build'
make: *** [all] Error 2
BUILD FAIL! Lib: grib_util Error:2

How should i resolve the problem?

@kgerheiser
Copy link
Contributor

The references to ipolates means the ip library is not being linked properly.

Where are you building and compiler are using? Could you show the link line right before the errors and maybe the line where CMake finds ip at the beginning of the build? This library is built frequently without issue.

@wyhqq
Copy link
Author

wyhqq commented Sep 3, 2021

Dear kgerheiser,

I compile it with gcc-9.1.0 on a supercomputer.

The ip library link seems to be OK.

The compile command line :
/gcc-9.1.0/bin/gfortran -g -fdefault-real-8 -O3 CMakeFiles/copygb.dir/copygb.F.o -o copygb /app/hpc-stacks/lib/libbacio_4.a /app/hpc-stacks/lib/libw3nco_4.a /app/hpc-stacks/lib64/libip_4.a /app/hpc-stacks/lib64/libsp_4.a /app/gcc-9.1.0/lib64/libgomp.so -lpthread

By the way, the /app/hpc-stacks/lib64/libip_4.a is compiled successfullly.

Is there any other possibility for the compiling errors?

@kgerheiser
Copy link
Contributor

kgerheiser commented Sep 4, 2021

Yeah, that looks right. It's the same link line I get with a successful build, but something is definitely being linked wrong if it can't find ipolates, ipolatev or makgds, which come from libip.

By any chance are you using the develop branch of ip? There's been some changes in there that would break grib_util in a suspiciously similar way.

@wyhqq
Copy link
Author

wyhqq commented Sep 4, 2021

There are several branches in https://github.com/NOAA-EMC/NCEPLIBS-grib_util,

Do you mean I should download NCEPLIBS-grib_util-master.zip other than NCEPLIBS-grib_util-develop.zip ?

@kgerheiser
Copy link
Contributor

No, I mean are you using the develop branch of NCEPLIBS-ip somehow?

https://github.com/NOAA-EMC/NCEPLIBS-ip

There are some compatibility breaking changes in the develop branch.

@wyhqq
Copy link
Author

wyhqq commented Sep 4, 2021

Thanks a lot. I will download master branch zip files, compile it again and response the results to you.

@kgerheiser
Copy link
Contributor

I recommend using the most recent release, tag v3.3.3

@wyhqq
Copy link
Author

wyhqq commented Sep 4, 2021

The build-stacks.sh download the IP with the following command:
git clone https://github.com/noaa-emc/nceplibs-ip ip-v3.3.3
But it is not clear which version will be downaded ( the NCEPLIBS-ip-develop.zip or the NCEPLIBS-ip-master.zip).

@wyhqq
Copy link
Author

wyhqq commented Sep 4, 2021

I found the tag v3.3.3, thanks

@wyhqq
Copy link
Author

wyhqq commented Sep 4, 2021

The same errors still comes up when I compile the grib-util even if I download the nceplibs-ip with tags v3.3.3 and compile it again.

@kgerheiser
Copy link
Contributor

kgerheiser commented Sep 4, 2021

I really think that's what the problem was. Did you install the new version and make sure remnants of the old build were deleted?

You can run nm libip_4.a to see the symbols in the library, and in there you should see makgds, ipolates, and ipolatev.

@edwardhartnett
Copy link
Contributor

Is this still an issue?

NCEPLIBS-grib_util is building well on my development machine and the github CI systems...

@edwardhartnett edwardhartnett added the build Building software is complicated label Jan 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Building software is complicated
Projects
None yet
Development

No branches or pull requests

3 participants