Opened 9 years ago

Closed 8 years ago

#48404 closed defect (fixed)

clang-3.6: libclang missing symbols in shared library

Reported by: macports@… Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version: 2.3.3
Keywords: Cc: larryv (Lawrence Velázquez)
Port: clang-3.6

Description

libclang is missing symbols.

$ nm /opt/local/libexec/llvm-3.6/lib/libclang.a | grep clang_CompileCommand 
00000000000002d3 T _clang_CompileCommand_getArg
000000000000028f T _clang_CompileCommand_getDirectory
000000000000039e T _clang_CompileCommand_getMappedSourceContent
0000000000000345 T _clang_CompileCommand_getMappedSourcePath
00000000000002b4 T _clang_CompileCommand_getNumArgs
0000000000000326 T _clang_CompileCommand_getNumMappedSources
000000000000020c T _clang_CompileCommands_dispose
0000000000000255 T _clang_CompileCommands_getCommand
0000000000000237 T _clang_CompileCommands_getSize
$ nm /opt/local/libexec/llvm-3.6/lib/libclang.dylib | grep clang_CompileCommand 
0000000000021888 T _clang_CompileCommand_getArg
0000000000021844 T _clang_CompileCommand_getDirectory
0000000000021869 T _clang_CompileCommand_getNumArgs
00000000000217c1 T _clang_CompileCommands_dispose
000000000002180a T _clang_CompileCommands_getCommand
00000000000217ec T _clang_CompileCommands_getSize

Missing are

000000000000039e T _clang_CompileCommand_getMappedSourceContent
0000000000000345 T _clang_CompileCommand_getMappedSourcePath
0000000000000326 T _clang_CompileCommand_getNumMappedSources

They are missing from libclang.exports file. ${SRC}/tools/clang/tools/libclang/libclang.exports

Can MacPorts patch that file so that symbols are correctly exported to the shared library?

Change History (6)

comment:2 Changed 9 years ago by Ionic (Mihai Moldovan)

Cc: larryv@… added
Keywords: clang removed
Owner: changed from macports-tickets@… to jeremyhu@…

Please remember to CC the maintainers next time. Do not add random tags.

comment:3 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Port: clang-3.6 added; clang removed
Summary: libclang missing symbols in shared libraryclang-3.6: libclang missing symbols in shared library

comment:4 Changed 9 years ago by jeremyhu (Jeremy Huddleston Sequoia)

If these are supposed to be API, I'll fix it. If upstream comments that they are not API, I won't fix. Waiting for comment in the upstream ticket.

comment:5 Changed 9 years ago by macports@…

ok cool. they are in the documentation..

http://clang.llvm.org/doxygen/group__COMPILATIONDB.html

And they are in the static library, libclang.a, but because they are missing from exports file, they fail to get correctly exported to the shared lib. But understand on waiting on upstream.

thanks!

comment:6 Changed 8 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Resolution: fixed
Status: newclosed

It looks like this is fixed in clang-3.8:

~ $ nm /opt/local/libexec/llvm-3.8/lib/libclang.dylib | grep clang_CompileCommand 
000000000002c02d T _clang_CompileCommand_getArg
000000000002bfc6 T _clang_CompileCommand_getDirectory
000000000002bfe9 T _clang_CompileCommand_getFilename
000000000002c0f4 T _clang_CompileCommand_getMappedSourceContent
000000000002c09d T _clang_CompileCommand_getMappedSourcePath
000000000002c00e T _clang_CompileCommand_getNumArgs
000000000002c07e t _clang_CompileCommand_getNumMappedSources
000000000002bf3d T _clang_CompileCommands_dispose
000000000002bf86 T _clang_CompileCommands_getCommand
000000000002bf68 T _clang_CompileCommands_getSize

~ $ nm /opt/local/libexec/llvm-3.7/lib/libclang.dylib | grep clang_CompileCommand 
0000000000022c4f T _clang_CompileCommand_getArg
0000000000022c0d T _clang_CompileCommand_getDirectory
0000000000022c30 T _clang_CompileCommand_getNumArgs
0000000000022b8a T _clang_CompileCommands_dispose
0000000000022bd3 T _clang_CompileCommands_getCommand
0000000000022bb5 T _clang_CompileCommands_getSize

Closing as fixed in current versions.

Note: See TracTickets for help on using tickets.