MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0027152Open CASCADE[OCCT] OCCT:Configurationpublic2016-02-10 16:412017-08-18 12:37
Reporterapn 
Assigned Toabv 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.0.0Fixed in Version[OCCT] 7.0.0 
Summary0027152: Undefined symbols in library TKernel.so using clang compiler
Descriptionundefined symbol: dlopen (./libTKernel.so)
undefined symbol: dlclose (./libTKernel.so)
undefined symbol: dlerror (./libTKernel.so)
undefined symbol: dlsym (./libTKernel.so)

clang --version
Ubuntu clang version 3.6.2-1 (tags/RELEASE_362/final) (based on LLVM 3.6.2)
Steps To ReproduceOn Linux:

- build without TBB
- run:
  ldd -r libTKernel.so
- check for undefined symbols
TagsNo tags attached.
Test case numberNot needed
Attached Files

- Relationships
parent of 0029016closedbugmaster Configuration, genproj.tcl - add missing definition of CSF_dl 

-  Notes
(0050596)
git (administrator)
2016-02-10 18:11

Branch CR27152 has been created by apn.

SHA-1: ef221ddc9c628cc91f2c8057f6919e6b465ae3a1


Detailed log of new commits:

Author: apn
Date: Wed Feb 10 18:11:36 2016 +0300

    0027152: Undefined symbols in library TKernel.so using clang compiler
    
    Added llvm library dependency when clang compiler is used
(0050597)
apn (administrator)
2016-02-10 18:12

Dear ibs, could you please review CR27152.
(0050607)
abv (manager)
2016-02-11 09:15

I have the same configuration (VirtualBox VM with Ubuntu 5.10 and CLang 3.6.2) and it builds and works just fine using CMake on current master. Please re-check this.
(0050763)
apn (administrator)
2016-02-15 16:49

There are errors in PRODUCTS during linking OCCLicenseGen and XtSchemaParser (vm-U1510-01 clang version 3.6.2-1):

Linking CXX executable ../../lin64/clang/bin/OCCLicenseGen
/U1510-64-clang-opt/OCCT/lin64/clang/lib/libTKernel.so: undefined reference to `dlopen'
/U1510-64-clang-opt/OCCT/lin64/clang/lib/libTKernel.so: undefined reference to `dlclose'
/U1510-64-clang-opt/OCCT/lin64/clang/lib/libTKernel.so: undefined reference to `dlerror'
/U1510-64-clang-opt/OCCT/lin64/clang/lib/libTKernel.so: undefined reference to `dlsym'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
src/OCCLicenseGen/CMakeFiles/OCCLicenseGen.dir/build.make:89
make[2]: *** [lin64/clang/bin/OCCLicenseGen-7.0.0] Error 1

Linking CXX executable ../../lin64/clang/bin/XtSchemaParser
/U1510-64-clang-opt/OCCT/lin64/clang/lib/libTKernel.so: undefined reference to `dlclose'
/U1510-64-clang-opt/OCCT/lin64/clang/lib/libTKernel.so: undefined reference to `dlsym'
/U1510-64-clang-opt/OCCT/lin64/clang/lib/libTKernel.so: undefined reference to `dlopen'
/U1510-64-clang-opt/OCCT/lin64/clang/lib/libTKernel.so: undefined reference to `dlerror'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
src/XtSchemaParser/CMakeFiles/XtSchemaParser.dir/build.make:104
make[2]: *** [lin64/clang/bin/XtSchemaParser-7.0.0] Error 1

Problem is solved by adding LLVM dependency to OCCLicenseGen and XtSchemaParser.
Dear abv, could you please review products branch CR27152.
(0050811)
git (administrator)
2016-02-16 14:25

Branch CR27152 has been updated forcibly by apn.

SHA-1: 5090030b5cf209e68870d7b6b7952068f2faee1f
(0050831)
apn (administrator)
2016-02-16 17:38

Added dl library dependency for TKernel in occt_toolkit.cmake instead of CSF_dl in TKernel's EXTERNLIB.
(0050850)
abv (manager)
2016-02-16 22:16

I seem to be able to reproduce this problem (ldd on TKernel.so does not list libdl.so) when building without TBB, can you confirm if you also building without TBB?
(0050852)
abv (manager)
2016-02-17 07:23

I propose adding an option "-z defs" in CMake on Linux to force linker errors if some symbol cannot be found during toolkit building. Additional flag "-lm" must be added to link to math library (for all toolkits, since we should be able to use C math functions from any place). Flag "-ldl" can be added for TKernel only, but can be also necessary for other libs -- this is to be checked.
(0050864)
apn (administrator)
2016-02-17 12:37
edited on: 2016-02-17 14:29

There is no undefined symbols in library TKernel.so when building with TBB. Also it's reproduced on Debian without TBB.

(0050887)
git (administrator)
2016-02-17 15:59

Branch CR27152_1 has been created by apn.

SHA-1: 2923aaf328f989b9bb56c27fe5bb4a82c8849db6


Detailed log of new commits:

Author: apn
Date: Wed Feb 17 15:59:12 2016 +0300

    0027152: Undefined symbols in library TKernel.so using clang compiler
    
    Added ldl dependency for TKernel only (other toolkits were checked, no undefined symbols)
    Added option "-z defs" for linking on Linux
    Added lm dependency for all toolkits
(0050890)
git (administrator)
2016-02-17 16:18

Branch CR27152_1 has been updated forcibly by apn.

SHA-1: 1a5cfe9f6edc78bb56c9e65e07df200e33fc80d8
(0050891)
abv (manager)
2016-02-17 16:24

No remarks, please integrate
(0052871)
git (administrator)
2016-04-17 13:27

Branch CR27152 has been deleted by kgv.

SHA-1: 5090030b5cf209e68870d7b6b7952068f2faee1f
(0052872)
git (administrator)
2016-04-17 13:27

Branch CR27152_1 has been deleted by kgv.

SHA-1: 1a5cfe9f6edc78bb56c9e65e07df200e33fc80d8

- Related Changesets
occt: master c2c9890c
Timestamp: 2016-02-17 12:59:12
Author: abv
Committer: abv
Details ] Diff ]
0027152: Undefined symbols in library TKernel.so using clang compiler

Added ldl dependency for TKernel only (other toolkits were checked, no undefined symbols)
Added option "-z defs" for linking on Linux
Added lm dependency for all toolkits
mod - adm/cmake/occt_csf.cmake Diff ] File ]
mod - adm/cmake/occt_defs_flags.cmake Diff ] File ]
mod - src/TKernel/EXTERNLIB Diff ] File ]

- Issue History
Date Modified Username Field Change
2016-02-10 16:41 apn New Issue
2016-02-10 16:41 apn Assigned To => bugmaster
2016-02-10 18:11 git Note Added: 0050596
2016-02-10 18:12 apn Note Added: 0050597
2016-02-10 18:12 apn Test case number => Not needed
2016-02-10 18:12 apn Assigned To bugmaster => ibs
2016-02-10 18:12 apn Status new => resolved
2016-02-11 09:14 apn Status resolved => assigned
2016-02-11 09:14 apn Assigned To ibs => apn
2016-02-11 09:15 abv Note Added: 0050607
2016-02-15 16:49 apn Note Added: 0050763
2016-02-15 17:38 apn Assigned To apn => abv
2016-02-15 17:38 apn Status assigned => resolved
2016-02-16 14:25 git Note Added: 0050811
2016-02-16 17:38 apn Note Added: 0050831
2016-02-16 22:16 abv Note Added: 0050850
2016-02-17 07:23 abv Note Added: 0050852
2016-02-17 07:24 abv Assigned To abv => apn
2016-02-17 07:24 abv Status resolved => assigned
2016-02-17 07:24 abv Target Version 7.1.0 => 7.0.0
2016-02-17 07:25 abv Steps to Reproduce Updated View Revisions
2016-02-17 12:37 apn Note Added: 0050864
2016-02-17 14:29 apn Note Edited: 0050864 View Revisions
2016-02-17 15:59 git Note Added: 0050887
2016-02-17 16:18 git Note Added: 0050890
2016-02-17 16:18 apn Assigned To apn => abv
2016-02-17 16:18 apn Status assigned => resolved
2016-02-17 16:24 abv Note Added: 0050891
2016-02-17 16:24 abv Assigned To abv => bugmaster
2016-02-17 16:24 abv Status resolved => reviewed
2016-02-19 10:43 bugmaster Status reviewed => tested
2016-02-21 08:52 abv Changeset attached => occt master c2c9890c
2016-02-21 08:52 abv Assigned To bugmaster => abv
2016-02-21 08:52 abv Status tested => verified
2016-02-21 08:52 abv Resolution open => fixed
2016-04-17 13:27 git Note Added: 0052871
2016-04-17 13:27 git Note Added: 0052872
2016-04-20 15:43 aiv Fixed in Version => 7.0.0
2016-04-20 15:50 aiv Status verified => closed
2017-08-18 12:37 kgv Relationship added parent of 0029016


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker