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

How to use -DDOWNLOAD_ONLY=ON to download source? #181

Closed
pmspire opened this issue Dec 3, 2020 · 3 comments
Closed

How to use -DDOWNLOAD_ONLY=ON to download source? #181

pmspire opened this issue Dec 3, 2020 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@pmspire
Copy link

pmspire commented Dec 3, 2020

Describe the bug
I try to use -DDOWNLOAD_ONLY=ON as described in README.md to download the source code for the libraries, but the download directory thus created is a shallow hierarchy of empty directories, with no source files.

To Reproduce

~ % git clone --recursive https://github.com/NOAA-EMC/NCEPLIBS.git
Cloning into 'NCEPLIBS'...
remote: Enumerating objects: 117, done.
remote: Counting objects: 100% (117/117), done.
remote: Compressing objects: 100% (89/89), done.
remote: Total 9349 (delta 43), reused 69 (delta 22), pack-reused 9232
Receiving objects: 100% (9349/9349), 26.67 MiB | 18.30 MiB/s, done.
Resolving deltas: 100% (3170/3170), done.

~ % cd NCEPLIBS/

~/NCEPLIBS % git checkout v1.3.0
HEAD is now at f9d26ec Merge pull request #179 from NOAA-EMC/cleanup/prod_util-components

~/NCEPLIBS % cmake -DDOWNLOAD_ONLY=ON .
-- The C compiler identification is GNU 4.8.5
-- The Fortran compiler identification is GNU 4.8.5
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - 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: /usr/bin/gfortran - skipped
-- Checking whether /usr/bin/gfortran supports Fortran 90
-- Checking whether /usr/bin/gfortran supports Fortran 90 - yes
-- Setting build type to 'Release' as none was specified.
-- Installing NCEPLIBS from /users/PYS0343/pmadden/NCEPLIBS/COMPONENTS
-- Installing NCEPLIBS at /usr/local
-- Configuring done
-- Generating done
-- Build files have been written to: /users/PYS0343/pmadden/NCEPLIBS

~/NCEPLIBS % tree download/
download/
├── emc_crtm
├── emc_post
├── nceplibs-bacio
├── nceplibs-bufr
├── nceplibs-g2
├── nceplibs-g2c
├── nceplibs-g2tmpl
├── nceplibs-gfsio
├── nceplibs-ip
├── nceplibs-ip2
├── nceplibs-landsfcutil
├── nceplibs-nemsio
├── nceplibs-nemsiogfs
├── nceplibs-sfcio
├── nceplibs-sigio
├── nceplibs-sp
├── nceplibs-w3emc
├── nceplibs-w3nco
├── nceplibs-wgrib2
└── nceplibs-wrf_io

20 directories, 0 files

Expected behavior
A download directory populated with source code.

Build Information
See above.

System
Linux (RHEL 7.7)

@pmspire pmspire added the bug Something isn't working label Dec 3, 2020
@kgerheiser
Copy link
Contributor

kgerheiser commented Dec 3, 2020

Perhaps counterintuitive, but you need to run make tarball and it will start the download process (without building) and create a tarball in the main directory.

We can update the documentation to make this more clear.

We use ExternalProject_Add to do the download and it starts at build time when you run make instead of configure time when you run CMake.

@pmspire
Copy link
Author

pmspire commented Dec 4, 2020

Thank you, @kgerheiser! I should have read further and realized that an extra step is necessary, instead of stopping short after examining the download directory. A slight tweak to the docs might help someone, but this one's on me.

@pmspire pmspire closed this as completed Dec 4, 2020
@pmspire
Copy link
Author

pmspire commented Dec 4, 2020

Pushing my luck a bit, do you happen to know if there's a strong correspondence between the libsrc submodule in https://github.com/NOAA-EMC/GSI (which, unfortunately, is not yet public as far as I can tell, and is only available via NOAA-private git) and this NCEPLIBS repo here? I'm trying to build GSI and have had trouble getting it to find pre-built bacio, bufr, etc., as described in NOAA-EMC/GSI#93. In addition to the approach I describe in that issue, I also tried building NCEPLIBS from this repo as a first step (successful) and then getting GSI to find it (unsuccessful so far). So, my current interest in getting the NCEPLIBS source tarball is in hopes that I can populate GSI's libsrc directory with its contents, maybe with some renaming, and get GSI to build the support libraries itself, as if git had been able to populate the libsrc directory from the submodule.

Probably my question is out of scope here, but it never hurts to ask.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants