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

The latest version of NGen.cpp causes a build error on GCC8 (Linux) #635

Closed
stcui007 opened this issue Sep 13, 2023 · 5 comments · Fixed by #636
Closed

The latest version of NGen.cpp causes a build error on GCC8 (Linux) #635

stcui007 opened this issue Sep 13, 2023 · 5 comments · Fixed by #636
Assignees
Labels
bug Something isn't working build Issues related to CMake and building ngen

Comments

@stcui007
Copy link
Contributor

stcui007 commented Sep 13, 2023

In build ngen with the latest master, it produces an error on GCC8 due to a missing "std" on line 298.

Current behavior

/home/shengting.cui/ngen_9.11.23/ngen/src/NGen.cpp: In function ‘int main(int, char**)’:
/home/shengting.cui/ngen_9.11.23/ngen/src/NGen.cpp:298:16: error: ‘make_unique’ was not declared in this scope
       router = make_unique<routing_py_adapter::Routing_Py_Adapter>(t_route_config_file_with_path);
                ^~~~~~~~~~~
/home/shengting.cui/ngen_9.11.23/ngen/src/NGen.cpp:298:16: note: suggested alternative:
In file included from /opt/rh/devtoolset-8/root/usr/include/c++/8/memory:80,
                 from /home/shengting.cui/ngen_9.11.23/ngen/include/realizations/catchment/Formulation_Manager.hpp:4,
                 from /home/shengting.cui/ngen_9.11.23/ngen/src/NGen.cpp:8:
/opt/rh/devtoolset-8/root/usr/include/c++/8/bits/unique_ptr.h:842:5: note:   ‘std::make_unique’
     make_unique(_Args&&...) = delete;```

## Expected behavior
No error output

at
1.


## Screenshots



@program--
Copy link
Contributor

For reference:

router = make_unique<routing_py_adapter::Routing_Py_Adapter>(t_route_config_file_with_path);

@stcui007
Copy link
Contributor Author

It appears this occurs only when NGEN_ROUTING_ACTIVE is turned on.

@mattw-nws
Copy link
Contributor

Curiously, I wasn't getting this on clang with NGEN_ROUTING_ACTIVE enabled... but after rebasing the branch I was on I get it now. In any case, yes this should have std:: stuck on the front of it (just not sure why now).

Related, @PhilMiller did you spare your wrath from

and in #603 on purpose? Those are sticking around after the zombie apocalypse. Whether Bmi_C_Pet_IT.cpp belongs where it is is debatable, but at least all the code it's testing is still in use.

@mattw-nws mattw-nws changed the title The latest version of NGen.cpp causes a build error on UCS machines (Linux) The latest version of NGen.cpp causes a build error on GCC8 (Linux) Sep 13, 2023
@mattw-nws mattw-nws added bug Something isn't working build Issues related to CMake and building ngen labels Sep 14, 2023
@PhilMiller
Copy link
Contributor

Fixed by #636

@PhilMiller
Copy link
Contributor

Related, @PhilMiller did you spare your wrath from


and


in #603 on purpose? Those are sticking around after the zombie apocalypse. Whether Bmi_C_Pet_IT.cpp belongs where it is is debatable, but at least all the code it's testing is still in use.

Documenting from Slack:
I left some of the test code alone as less impactful for the substantial effort. The test .cpp file won't hurt anything else. I neglected that there's a .hpp file, which maybe should be cleaned up.

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

Successfully merging a pull request may close this issue.

4 participants