compressonator icon indicating copy to clipboard operation
compressonator copied to clipboard

error: unknown type name 'CMP_Vec3ui'

Open yurivict opened this issue 3 years ago • 6 comments

===>  Building for compressonator-4.2.5185
[  0% 6/317] /usr/bin/c++ -DASPM_GPU -DENABLE_MAKE_COMPATIBLE_API -DNO_LEGACY_BEHAVIOR=1 -DOPTION_BUILD_DRACO=0 -DOPTION_BUILD_EXR=1 -DOPTION_BUILD_GUI=1 -DOPTION_BUILD_KTX2=1 -DOPTION_CMP_APC=0 -DOPTION_CMP_DIRECTX=0 -DOPTION_CMP_GTC=0 -DOPTION_CMP_OPENCV=1 -DOPTION_CMP_OPENGL=1 -DOPTION_CMP_QT=1 -DOPTION_CMP_VULKAN=1 -DUSE_ETCPACK -DUSE_MESH_CLI -DUSE_OLD_SWIZZLE -DUSE_QTWEBKIT -D_CMP_CPP14_=1 -D_LINUX -D_LINUX=1 -I/disk-samsung/freebsd-ports/archivers/compressonator/work/compressonator-4.2.5185/cmp_core/shaders -I/disk-samsung/freebsd-ports/archivers/compressonator/work/compressonator-4.2.5185/cmp_core/source -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -fno-omit-frame-pointer -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -fno-omit-frame-pointer   -std=c++14 -fPIC -Wno-write-strings -std=gnu++14 -MD -MT cmp_core/CMakeFiles/CMP_Core.dir/shaders/bc3_encode_kernel.cpp.o -MF cmp_core/CMakeFiles/CMP_Core.dir/shaders/bc3_encode_kernel.cpp.o.d -o cmp_core/CMakeFiles/CMP_Core.dir/shaders/bc3_encode_kernel.cpp.o -c /disk-samsung/freebsd-ports/archivers/compressonator/work/compressonator-4.2.5185/cmp_core/shaders/bc3_encode_kernel.cpp
FAILED: cmp_core/CMakeFiles/CMP_Core.dir/shaders/bc3_encode_kernel.cpp.o 
/usr/bin/c++ -DASPM_GPU -DENABLE_MAKE_COMPATIBLE_API -DNO_LEGACY_BEHAVIOR=1 -DOPTION_BUILD_DRACO=0 -DOPTION_BUILD_EXR=1 -DOPTION_BUILD_GUI=1 -DOPTION_BUILD_KTX2=1 -DOPTION_CMP_APC=0 -DOPTION_CMP_DIRECTX=0 -DOPTION_CMP_GTC=0 -DOPTION_CMP_OPENCV=1 -DOPTION_CMP_OPENGL=1 -DOPTION_CMP_QT=1 -DOPTION_CMP_VULKAN=1 -DUSE_ETCPACK -DUSE_MESH_CLI -DUSE_OLD_SWIZZLE -DUSE_QTWEBKIT -D_CMP_CPP14_=1 -D_LINUX -D_LINUX=1 -I/disk-samsung/freebsd-ports/archivers/compressonator/work/compressonator-4.2.5185/cmp_core/shaders -I/disk-samsung/freebsd-ports/archivers/compressonator/work/compressonator-4.2.5185/cmp_core/source -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -fno-omit-frame-pointer -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -fno-omit-frame-pointer   -std=c++14 -fPIC -Wno-write-strings -std=gnu++14 -MD -MT cmp_core/CMakeFiles/CMP_Core.dir/shaders/bc3_encode_kernel.cpp.o -MF cmp_core/CMakeFiles/CMP_Core.dir/shaders/bc3_encode_kernel.cpp.o.d -o cmp_core/CMakeFiles/CMP_Core.dir/shaders/bc3_encode_kernel.cpp.o -c /disk-samsung/freebsd-ports/archivers/compressonator/work/compressonator-4.2.5185/cmp_core/shaders/bc3_encode_kernel.cpp
In file included from /disk-samsung/freebsd-ports/archivers/compressonator/work/compressonator-4.2.5185/cmp_core/shaders/bc3_encode_kernel.cpp:23:
In file included from /disk-samsung/freebsd-ports/archivers/compressonator/work/compressonator-4.2.5185/cmp_core/shaders/bc3_encode_kernel.h:26:
/disk-samsung/freebsd-ports/archivers/compressonator/work/compressonator-4.2.5185/cmp_core/shaders/common_def.h:450:9: error: unknown type name 'CMP_Vec3ui'
typedef CMP_Vec3ui CGU_Vec3ui;
        ^
/disk-samsung/freebsd-ports/archivers/compressonator/work/compressonator-4.2.5185/cmp_core/shaders/common_def.h:451:9: error: unknown type name 'CMP_Vec3ui'
typedef CMP_Vec3ui CGV_Vec3ui;
        ^
/disk-samsung/freebsd-ports/archivers/compressonator/work/compressonator-4.2.5185/cmp_core/shaders/common_def.h:453:9: error: unknown type name 'CMP_Vec2f'
typedef CMP_Vec2f  CGU_Vec2f;
        ^
/disk-samsung/freebsd-ports/archivers/compressonator/work/compressonator-4.2.5185/cmp_core/shaders/common_def.h:454:9: error: unknown type name 'CMP_Vec3f'
typedef CMP_Vec3f  CGU_Vec3f;
        ^
/disk-samsung/freebsd-ports/archivers/compressonator/work/compressonator-4.2.5185/cmp_core/shaders/common_def.h:456:9: error: unknown type name 'CMP_Vec4uc'
typedef CMP_Vec4uc CGU_Vec4uc;
        ^
/disk-samsung/freebsd-ports/archivers/compressonator/work/compressonator-4.2.5185/cmp_core/shaders/common_def.h:457:9: error: unknown type name 'CMP_Vec4uc'
typedef CMP_Vec4uc CGV_Vec4uc;
        ^

Version: 4.2.5185 clang-11 OS: FreeBSD 13

yurivict avatar Aug 18 '21 17:08 yurivict

@yurivict Linux build was tested using gcc.

The path to cmp_math_vec4.h is needed for cmp_core lib to build. This definition INC_cmp_math_vec4 seems to be missing or linux is not defined in common_def.h

NPCompress avatar Aug 18 '21 17:08 NPCompress

Linux build was tested using gcc.

gcc also fails:

/disk-samsung/freebsd-ports/archivers/compressonator/work/compressonator-4.2.5185/cmp_core/shaders/bcn_common_api.h:47:1: error: unknown type name 'CMP_STATIC'
CMP_STATIC CGU_FLOAT cmp_fabs(CMP_IN CGU_FLOAT x)
^

This definition INC_cmp_math_vec4 seems to be missing or linux is not defined in common_def.h

_LINUX is defined, cmp_math_vec4.h is present. Perhaps it is ifdefed away.

yurivict avatar Aug 18 '21 17:08 yurivict

@yurivict Agree, this seems to be the case not sure where it must be undefined. In your build setup you can try adding a few lines to the header to check if underscore linux underscore is un defined then force it to be defined.

Maybe a typo but your comment is showing underscore LINUX

NPCompress avatar Aug 18 '21 18:08 NPCompress

@yurivict Curious as to how much compatibility FreeBSD 13 has with Linux. Have you built the SDK before on this OS or is this the first time. ?

NPCompress avatar Aug 18 '21 18:08 NPCompress

FreeBSD 13 is very compatible, but for example GPU isn't available.

This is the first time I build this project in an attempt to create a port.

yurivict avatar Aug 18 '21 18:08 yurivict

@yurivict Most likely will have to add some specific OS definitions in order for the port to work. Send us a pull request on your changes so support can be added for future updates.

NPCompress avatar Aug 18 '21 18:08 NPCompress