pablode / gatling

Hydra-enabled GPU path tracer that supports MaterialX and MDL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compile errors on Linux

ib00 opened this issue · comments

commented

I am trying to compile on Linux (Manjaro) with gcc 11.

I am getting two errors:

  1. src/hdGatling/src/Camera.cpp:39

error: ‘atanf’ is not a member of ‘std’

This can be easily fixed by using atanf and not std::atanf.

  1. Linking error:

Linking CXX shared library ../../bin/hdGatling.so
/usr/bin/ld: ../../bin/libshadergen.a(MdlHlslCodeGen.cpp.o): warning: relocation against _ZN2sg19MATERIAL_STATE_NAMEE' in read-only section .text'
/usr/bin/ld: ../../bin/libgi.a(gi.c.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC

Any ideas?

commented

I have sorted out the second problem by manually editing CMake files and change everything from "STATIC"
to "SHARED".

I turned option "SHARED" in the top level CMake file, but it didn't seem to propagate to other dependencies.

Hi @ib00, thanks for reporting this.

I've fixed the issues in d9f61a6 and 255422a, respectively. Tested under Ubuntu 20.04 with GCC 11.1.0.