Autodesk / arnold-usd

Arnold components for USD
https://www.arnoldrenderer.com/
Other
244 stars 57 forks source link

Building on Arch Linux #1623

Closed adro79 closed 1 year ago

adro79 commented 1 year ago

Describe the bug I'm having problems building arnold-usd on Arch Linux with CMake. Seems that glibc is failing.

To Reproduce Steps to reproduce the behavior:

  1. Up-to-date Arch system
  2. Build with CMake

Log

-- The C compiler identification is Clang 15.0.7
-- The CXX compiler identification is Clang 15.0.7
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- USD_LIB_PREFIX is not defined, we are now trying to find it
-- /usr/share/usd/lib usd.so
-- Found USD_LIB_PREFIX: 
-- Found USD: /usr/share/usd/include (found version "0.23.8") 
-- Arnold library: /opt/arnold/bin/libai.so
-- Arnold headers: /opt/arnold/include
-- Arnold version: 7.2.3.1
-- Found Arnold: /opt/arnold/bin (found version "7.2.3.1") 
-- Found Python3: /home/adro/.pyenv/shims/python3.11 (found version "3.11.3") found components: Development Interpreter Development.Module Development.Embed 
-- Found TBB: /opt/tbb2019/include (found version "2019.0")  
00:00:00   111MB         | log started Thu Aug 17 18:42:25 2023
00:00:00   111MB         | Arnold 7.2.3.1 [6f30e43d] linux x86_64 clang-15.0.7 oiio-2.4.1 osl-1.12.9 vdb-7.1.1 adlsdk-7.4.2.47 clmhub-3.1.1.43 rlm-14.2.5 optix-6.6.0 2023/08/10 10:36:08
00:00:00   111MB         | running on adroLinux, pid=629391
00:00:00   111MB         |  1 x AMD Ryzen 7 5800X 8-Core Processor (8 cores, 16 logical) with 32002MB
00:00:00   111MB         |  NVIDIA driver version 535.98 (Optix 60806)
00:00:00   111MB         |  GPU 0: NVIDIA GeForce RTX 3090 @ 1695MHz (compute 8.6) with 24226MB (22247MB available) (NVLink:0)
00:00:00   111MB         |  Arch Linux rolling (n/a), Linux kernel 6.4.10-zen2-1-zen
00:00:00   111MB         |  soft limit for open files changed from 1024 to 524286
00:00:00   111MB         |  
00:00:00   111MB         | Installing system handler with mask 255
00:00:00   122MB         | [color_manager_ocio] default ocio.config found in /opt/arnold/bin/../ocio/configs/arnold/config.ocio
00:00:00   122MB         | loading plugins from /opt/arnold/bin/../plugins ...
00:00:00   123MB         |  alembic_proc.so: alembic uses Arnold 7.2.3.1
00:00:00   144MB         |  usd_proc.so: usd uses Arnold 7.2.3.1
00:00:00   144MB         |  cryptomatte.so: cryptomatte uses Arnold 7.2.3.1
00:00:00   144MB         |  cryptomatte.so: cryptomatte_filter uses Arnold 7.2.3.1
00:00:00   144MB         |  cryptomatte.so: cryptomatte_manifest_driver uses Arnold 7.2.3.1
00:00:00   144MB         | loaded 5 plugins from 3 lib(s) in 0:00.01
00:00:00   161MB         |  
00:00:00   161MB         | releasing resources
00:00:00   161MB         |  unloading 3 plugins
00:00:00   161MB         |   closing alembic_proc.so ...
00:00:00   160MB         |   closing usd_proc.so ...
00:00:00   160MB         |   closing cryptomatte.so ...
00:00:00   160MB         |  unloading plugins done
00:00:00   160MB         | Arnold shutdown
free(): invalid pointer
00:00:00 WARNING | signal caught: SIGABRT -- Abnormal process abort

****
* Arnold 7.2.3.1 [6f30e43d] linux x86_64 clang-15.0.7 oiio-2.4.1 osl-1.12.9 vdb-7.1.1 adlsdk-7.4.2.47 clmhub-3.1.1.43 rlm-14.2.5 optix-6.6.0 2023/08/10 10:36:08
* CRASHED in pthread_key_delete 
* signal caught: SIGABRT -- Abnormal process abort
*
* backtrace:
>> 0 0x00007fc33f08e83c [libc.so.6 ] pthread_key_delete 
*  1 0x00007fc33f03e667 [libc.so.6 ] raise              
*  2 0x00007fc33f0264b7 [libc.so.6 ] abort              
*  3 0x00007fc33f02738f [libc.so.6 ] perror             
*  4 0x00007fc33f0987b6 [libc.so.6 ] timer_settime      
*  5 0x00007fc33f09a6f7 [libc.so.6 ] __default_morecore 
*  6 0x00007fc33f09d7b2 [libc.so.6 ] free               
*  7 0x00007fc337700bc3 [libai.so  ] free               
*  8 0x00007fc332fe8ed8 [libai.so  ] AiFree             
*  9 0x00007fc332f88603 [libai.so  ]                    
* 10 0x00007fc33f040cc5 [libc.so.6 ] erand48_r          
* 11 0x00007fc33f040e0f [libc.so.6 ] exit               
* 12 0x00007fc33f027cd6 [libc.so.6 ] __libc_init_first  
* 13 0x00007fc33f027d89 [libc.so.6 ] __libc_start_main  
* 14 0x000056502d217044 [python3.11] _start             
*
* loaded modules:
*    0x00007fc33f000000  libc.so.6
*    0x00007fc332000000  libai.so
*    0x000056502d216000  python3.11
*
* memory: VM 4941 MB, RSS 152 MB, 0 page faults
****
Subprocess aborted
#################################################################################################
#  USD_DISABLE_PRIM_DEFINITIONS_FOR_USDGENSCHEMA is overridden to 'true'.  Default is 'false'.  #
#################################################################################################
Processing schema classes:
ArnoldUsdLuxLightFilter, UsdImagingArnoldMeshLightAdapter, ArnoldNodeGraph, ArnoldOptions, ArnoldCamera, ArnoldCameraAPI, ArnoldLight, ArnoldLightAPI, ArnoldDriver, ArnoldFilter, ArnoldShape, ArnoldShapeAPI, ArnoldColorManager, ArnoldOperator, ArnoldPerspCamera, ArnoldPerspCameraAPI, ArnoldOrthoCamera, ArnoldFisheyeCamera, ArnoldCylCamera, ArnoldSphericalCamera, ArnoldVrCamera, ArnoldUvCamera, ArnoldPointLight, ArnoldPointLightAPI, ArnoldDistantLight, ArnoldDistantLightAPI, ArnoldQuadLight, ArnoldQuadLightAPI, ArnoldSpotLight, ArnoldSkydomeLight, ArnoldSkydomeLightAPI, ArnoldCylinderLight, ArnoldDiskLight, ArnoldDiskLightAPI, ArnoldMeshLight, ArnoldMeshLightAPI, ArnoldPhotometricLight, ArnoldDriverJpeg, ArnoldDriverNoOp, ArnoldDriverPng, ArnoldDriverTiff, ArnoldDriverDeepexr, ArnoldDriverExr, ArnoldImagerColorCorrect, ArnoldImagerColorCurves, ArnoldImagerDenoiserNoice, ArnoldImagerDenoiserOptix, ArnoldImagerDenoiserOidn, ArnoldImagerExposure, ArnoldImagerLensEffects, ArnoldImagerLightMixer, ArnoldImagerTonemap, ArnoldImagerWhiteBalance, ArnoldBoxFilter, ArnoldTriangleFilter, ArnoldCatromFilter, ArnoldMitnetFilter, ArnoldGaussianFilter, ArnoldSincFilter, ArnoldBlackmanHarrisFilter, ArnoldClosestFilter, ArnoldFarthestFilter, ArnoldVarianceFilter, ArnoldHeatmapFilter, ArnoldContourFilter, ArnoldDiffFilter, ArnoldSphere, ArnoldSphereAPI, ArnoldCylinder, ArnoldCylinderAPI, ArnoldCone, ArnoldConeAPI, ArnoldDisk, ArnoldPlane, ArnoldPolymesh, ArnoldPolymeshAPI, ArnoldNurbs, ArnoldBox, ArnoldBoxAPI, ArnoldCurves, ArnoldCurvesAPI, ArnoldPoints, ArnoldPointsAPI, ArnoldImplicit, ArnoldGinstance, ArnoldProcedural, ArnoldListAggregate, ArnoldVolume, ArnoldVolumeImplicit, ArnoldInstancer, ArnoldColorManagerOcio, ArnoldMaterialx, ArnoldMerge, ArnoldSetParameter, ArnoldDisable, ArnoldSwitchOperator, ArnoldSetTransform, ArnoldCollection, ArnoldIncludeGraph, ArnoldStringReplace, ArnoldAlembic, ArnoldUsd, ArnoldCryptomatteFilter, ArnoldCryptomatteManifestDriver, ArnoldProceduralCustom
Updated token b-spline to a valid identifier b_spline
Updated token catmull-rom to a valid identifier catmull_rom
Updated token b-spline to a valid identifier b_spline
Updated token catmull-rom to a valid identifier catmull_rom
Loading Templates from /usr/share/usd/lib/usd/usd/resources/codegenTemplates
CMake Error at CMakeLists.txt:149 (add_subdirectory):
  add_subdirectory given source "translator" which is not an existing
  directory.

CMake Error at CMakeLists.txt:150 (add_subdirectory):
  add_subdirectory given source "procedural" which is not an existing
  directory.

Used Software Versions

Additional context Build Script:

build() {
    export CC=clang
    export CXX=clang++
    export LD_PRELOAD=/usr/lib/libjemalloc.so.2

    _CMAKE_FLAGS+=(
        -DCMAKE_BUILD_TYPE=Release
        -DCMAKE_INSTALL_PREFIX=/usr/share/usd
        -DARNOLD_LOCATION=/opt/arnold
        -DUSD_LOCATION=/usr/share/usd
        -DTBB_ROOT_DIR=/opt/tbb2019
        -DUSD_STATIC_BUILD=ON
        -DBUILD_USE_PYTHON3=ON
        -Wno-dev
    )

    cmake -S arnold-usd -B build -G Ninja "${_CMAKE_FLAGS[@]}"

    ninja -C build ${MAKEFLAGS:--j12}
}
autodesk-oss-arnold-bot[bot] commented 1 year ago

Issue synced internally to ARNOLD-13969

cpichard commented 1 year ago

Hi @adro79, this crash is very likely related to the use of jemalloc. There is a patch coming up soon for this issue. Adding @ThiagoIze for visibility. Thanks

adro79 commented 1 year ago

Hi, thanks to the lastest commits to the master branch I was able to build Arnold-USD in Arch Linux.

Thanks a lot @cpichard! I'll close this out.