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

CMake and CI overhaul #1072

Merged
merged 1 commit into from
Nov 7, 2019
Merged

Conversation

lgritz
Copy link
Collaborator

@lgritz lgritz commented Oct 30, 2019

I prototyped all this stuff in OIIO over the last month, and now am
finally porting the methodology to OSL. Major changes:

  • Bump CMake minimum to 3.12

  • Massive refactor of cmake files to move to modern idioms and best
    practices. Beware some changed conventions for controlling the build:

    • CMAKE_CXX_STANDARD instead of USE_CPP
    • CXX_VISIBILITY_PRESET instead of HIDESYMBOLS
    • BUILD_SHARED_LIBS instead of BUILDSTATIC
    • Package_ROOT to hint where to find dependencies, instead of
      some random selection of PACKAGEHOME, PACKAGE_ROOT_DIR, etc.
  • Start using GitHub CI.

I prototyped all this stuff in OIIO over the last month, and now am
finally porting the methodology to OSL. Major changes:

* Bump CMake minimum to 3.12

* Massive refactor of cmake files to move to modern idioms and best
  practices. Beware some changed conventions for controlling the build:
    - CMAKE_CXX_STANDARD instead of USE_CPP
    - CXX_VISIBILITY_PRESET instead of HIDESYMBOLS
    - BUILD_SHARED_LIBS instead of BUILDSTATIC
    - Package_ROOT to hint where to find dependencies, instead of
      some random selection of PACKAGEHOME, PACKAGE_ROOT_DIR, etc.

* Start using GitHub CI.
@lgritz lgritz merged commit d3206b9 into AcademySoftwareFoundation:master Nov 7, 2019
@lgritz lgritz deleted the lg-cmake branch November 7, 2019 08:02
@sambler
Copy link
Contributor

sambler commented Jan 7, 2020

I get link failures with pugi starting at this commit, still persists at be720a3

[179/748] : && /usr/bin/c++  -DNDEBUG -stdlib=libc++ -DNDEBUG  -Wl,-rpath=/usr/local/lib -fstack-protector-strong src/testrender/CMakeFiles/testrender.dir/optix_stringtable.cpp.o src/testrender/CMakeFiles/testrender.dir/optixraytracer.cpp.o src/testrender/CMakeFiles/testrender.dir/shading.cpp.o src/testrender/CMakeFiles/testrender.dir/simpleraytracer.cpp.o src/testrender/CMakeFiles/testrender.dir/testrender.cpp.o  -o src/testrender/testrender -L/usr/local/lib  -L/usr/local/llvm90/lib -Wl,-rpath,/usr/local/lib:/usr/local/llvm90/lib:/tmp/workdir/home/shane/Projects/FreeBSD-Ports/sambler-ports/graphics/openshadinglanguage-dev/work/.build/src/liboslexec:/tmp/workdir/home/shane/Projects/FreeBSD-Ports/sambler-ports/graphics/openshadinglanguage-dev/work/.build/src/liboslquery: src/liboslexec/liboslexec.so.1.11.1 src/liboslquery/liboslquery.so.1.11.1 /usr/local/lib/libOpenImageIO.so /usr/local/lib/libImath-2_3.so /usr/local/lib/libIex-2_3.so /usr/local/lib/libHalf.so /usr/local/lib/libIlmThread-2_3.so -pthread && :
FAILED: src/testrender/testrender 
: && /usr/bin/c++  -DNDEBUG -stdlib=libc++ -DNDEBUG  -Wl,-rpath=/usr/local/lib -fstack-protector-strong src/testrender/CMakeFiles/testrender.dir/optix_stringtable.cpp.o src/testrender/CMakeFiles/testrender.dir/optixraytracer.cpp.o src/testrender/CMakeFiles/testrender.dir/shading.cpp.o src/testrender/CMakeFiles/testrender.dir/simpleraytracer.cpp.o src/testrender/CMakeFiles/testrender.dir/testrender.cpp.o  -o src/testrender/testrender -L/usr/local/lib  -L/usr/local/llvm90/lib -Wl,-rpath,/usr/local/lib:/usr/local/llvm90/lib:/tmp/workdir/home/shane/Projects/FreeBSD-Ports/sambler-ports/graphics/openshadinglanguage-dev/work/.build/src/liboslexec:/tmp/workdir/home/shane/Projects/FreeBSD-Ports/sambler-ports/graphics/openshadinglanguage-dev/work/.build/src/liboslquery: src/liboslexec/liboslexec.so.1.11.1 src/liboslquery/liboslquery.so.1.11.1 /usr/local/lib/libOpenImageIO.so /usr/local/lib/libImath-2_3.so /usr/local/lib/libIex-2_3.so /usr/local/lib/libHalf.so /usr/local/lib/libIlmThread-2_3.so -pthread && :
ld: error: undefined symbol: pugi::xml_document::xml_document()
>>> referenced by simpleraytracer.cpp
>>>               src/testrender/CMakeFiles/testrender.dir/simpleraytracer.cpp.o:(OSL_v1_11::SimpleRaytracer::parse_scene_xml(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&))

ld: error: undefined symbol: pugi::xml_parse_result::xml_parse_result()
>>> referenced by simpleraytracer.cpp
>>>               src/testrender/CMakeFiles/testrender.dir/simpleraytracer.cpp.o:(OSL_v1_11::SimpleRaytracer::parse_scene_xml(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&))

ld: error: undefined symbol: pugi::xml_document::load_file(char const*, unsigned int, pugi::xml_encoding)
>>> referenced by simpleraytracer.cpp
>>>               src/testrender/CMakeFiles/testrender.dir/simpleraytracer.cpp.o:(OSL_v1_11::SimpleRaytracer::parse_scene_xml(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&))

ld: error: undefined symbol: pugi::xml_document::load_buffer(void const*, unsigned long, unsigned int, pugi::xml_encoding)
>>> referenced by simpleraytracer.cpp
>>>               src/testrender/CMakeFiles/testrender.dir/simpleraytracer.cpp.o:(OSL_v1_11::SimpleRaytracer::parse_scene_xml(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&))

ld: error: undefined symbol: pugi::xml_parse_result::operator bool() const
>>> referenced by simpleraytracer.cpp
>>>               src/testrender/CMakeFiles/testrender.dir/simpleraytracer.cpp.o:(OSL_v1_11::SimpleRaytracer::parse_scene_xml(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&))

ld: error: undefined symbol: pugi::xml_parse_result::description() const
>>> referenced by simpleraytracer.cpp
>>>               src/testrender/CMakeFiles/testrender.dir/simpleraytracer.cpp.o:(OSL_v1_11::SimpleRaytracer::parse_scene_xml(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&))

ld: error: undefined symbol: pugi::xml_node::child(char const*) const
>>> referenced by simpleraytracer.cpp
>>>               src/testrender/CMakeFiles/testrender.dir/simpleraytracer.cpp.o:(OSL_v1_11::SimpleRaytracer::parse_scene_xml(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&))

ld: error: undefined symbol: pugi::xml_node::operator!() const
>>> referenced by simpleraytracer.cpp
>>>               src/testrender/CMakeFiles/testrender.dir/simpleraytracer.cpp.o:(OSL_v1_11::SimpleRaytracer::parse_scene_xml(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&))

ld: error: undefined symbol: pugi::xml_node::first_child() const
>>> referenced by simpleraytracer.cpp
>>>               src/testrender/CMakeFiles/testrender.dir/simpleraytracer.cpp.o:(OSL_v1_11::SimpleRaytracer::parse_scene_xml(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&))

ld: error: undefined symbol: pugi::xml_node::operator void (*)(pugi::xml_node***)() const
>>> referenced by simpleraytracer.cpp
>>>               src/testrender/CMakeFiles/testrender.dir/simpleraytracer.cpp.o:(OSL_v1_11::SimpleRaytracer::parse_scene_xml(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&))

ld: error: undefined symbol: pugi::xml_node::name() const
>>> referenced by simpleraytracer.cpp
>>>               src/testrender/CMakeFiles/testrender.dir/simpleraytracer.cpp.o:(OSL_v1_11::SimpleRaytracer::parse_scene_xml(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&))

ld: error: undefined symbol: pugi::xml_node::first_attribute() const
>>> referenced by simpleraytracer.cpp
>>>               src/testrender/CMakeFiles/testrender.dir/simpleraytracer.cpp.o:(OSL_v1_11::SimpleRaytracer::parse_scene_xml(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&))

ld: error: undefined symbol: pugi::xml_attribute::operator void (*)(pugi::xml_attribute***)() const
>>> referenced by simpleraytracer.cpp
>>>               src/testrender/CMakeFiles/testrender.dir/simpleraytracer.cpp.o:(OSL_v1_11::SimpleRaytracer::parse_scene_xml(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&))

ld: error: undefined symbol: pugi::xml_attribute::value() const
>>> referenced by simpleraytracer.cpp
>>>               src/testrender/CMakeFiles/testrender.dir/simpleraytracer.cpp.o:(OSL_v1_11::SimpleRaytracer::parse_scene_xml(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&))

ld: error: undefined symbol: pugi::xml_attribute::name() const
>>> referenced by simpleraytracer.cpp
>>>               src/testrender/CMakeFiles/testrender.dir/simpleraytracer.cpp.o:(OSL_v1_11::SimpleRaytracer::parse_scene_xml(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&))

ld: error: undefined symbol: pugi::xml_attribute::next_attribute() const
>>> referenced by simpleraytracer.cpp
>>>               src/testrender/CMakeFiles/testrender.dir/simpleraytracer.cpp.o:(OSL_v1_11::SimpleRaytracer::parse_scene_xml(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&))

ld: error: undefined symbol: pugi::xml_node::name() const
>>> referenced by simpleraytracer.cpp
>>>               src/testrender/CMakeFiles/testrender.dir/simpleraytracer.cpp.o:(OSL_v1_11::SimpleRaytracer::parse_scene_xml(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&))

ld: error: undefined symbol: pugi::xml_node::attribute(char const*) const
>>> referenced by simpleraytracer.cpp
>>>               src/testrender/CMakeFiles/testrender.dir/simpleraytracer.cpp.o:(OSL_v1_11::SimpleRaytracer::parse_scene_xml(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&))

ld: error: undefined symbol: pugi::xml_node::attribute(char const*) const
>>> referenced by simpleraytracer.cpp
>>>               src/testrender/CMakeFiles/testrender.dir/simpleraytracer.cpp.o:(OSL_v1_11::SimpleRaytracer::parse_scene_xml(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&))

ld: error: undefined symbol: pugi::xml_node::attribute(char const*) const
>>> referenced by simpleraytracer.cpp
>>>               src/testrender/CMakeFiles/testrender.dir/simpleraytracer.cpp.o:(OSL_v1_11::SimpleRaytracer::parse_scene_xml(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&))

@lgritz
Copy link
Collaborator Author

lgritz commented Jan 9, 2020

@sambler I think I spotted the problem, proposed solution in #1094

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

Successfully merging this pull request may close these issues.

2 participants