New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SR-15532] Compiler doesn't load public property declarations in another module under some conditions. #57835
Comments
Symbols exist in the $ nm libMyLib.so
U $sSS21_builtinStringLiteral17utf8CodeUnitCount7isASCIISSBp_BwBi1_tcfC
00000000000009dc T $sSo7in_addrV5MyLibE3fooSSvg
0000000000000a2c R $sSo7in_addrV5MyLibE3fooSSvpMV
000000000001fd00 d _DYNAMIC
000000000001ffc0 d _GLOBAL_OFFSET_TABLE_
w _ITM_deregisterTMCloneTable
w _ITM_registerTMCloneTable
00000000000008bc t _ZL23swift_image_constructorv
0000000000020030 d _ZL4Note
0000000000020068 b _ZN12_GLOBAL__N_18sectionsE
0000000000000b20 r __FRAME_END__
0000000000020030 d __TMC_END__
0000000000020030 d __TMC_LIST__
000000000002005f D __bss_start
w __cxa_finalize
0000000000000870 t __do_global_dtors_aux
000000000001fce0 d __do_global_dtors_aux_fini_array_entry
0000000000020028 d __dso_handle
000000000001fce8 d __frame_dummy_init_array_entry
w __gmon_start__
0000000000000a28 r __start_swift5_assocty
0000000000000a28 r __start_swift5_builtin
0000000000000a28 r __start_swift5_capture
0000000000000a28 r __start_swift5_fieldmd
0000000000000a28 r __start_swift5_protocol_conformances
0000000000000a28 r __start_swift5_protocols
0000000000000a28 r __start_swift5_reflstr
0000000000000a28 r __start_swift5_replac2
0000000000000a28 r __start_swift5_replace
0000000000000a28 r __start_swift5_type_metadata
0000000000000a28 r __start_swift5_typeref
0000000000000a28 r __stop_swift5_assocty
0000000000000a28 r __stop_swift5_builtin
0000000000000a28 r __stop_swift5_capture
0000000000000a28 r __stop_swift5_fieldmd
0000000000000a28 r __stop_swift5_protocol_conformances
0000000000000a28 r __stop_swift5_protocols
0000000000000a28 r __stop_swift5_reflstr
0000000000000a28 r __stop_swift5_replac2
0000000000000a28 r __stop_swift5_replace
0000000000000a28 r __stop_swift5_type_metadata
0000000000000a28 r __stop_swift5_typeref
0000000000000a30 r __swift_reflection_version
000000000002005f D _edata
0000000000020138 D _end
0000000000000a18 t _fini
0000000000000760 t _init
w _swift_FORCE_LOAD_$_swiftGlibc
000000000001fcf8 d _swift_FORCE_LOAD_$_swiftGlibc_$_MyLib
00000000000007e8 t call_weak_fn
0000000000020060 b completed.9126
0000000000000800 t deregister_tm_clones
00000000000008b8 t frame_dummy
0000000000000830 t register_tm_clones
U swift_addNewDSOImage
// swift-interface-format-version: 1.0
// swift-compiler-version: Swift version 5.5.1 (swift-5.5.1-RELEASE)
// swift-module-flags: -target aarch64-unknown-linux-gnu -disable-objc-interop -enable-library-evolution -module-name MyLib
import Foundation
import Swift
import _Concurrency
public typealias A = SwiftGlibc.in_addr
extension SwiftGlibc.in_addr {
public var foo: Swift.String {
get
}
} Is ModuleLoader responsible for this issue? |
I suspect that SR-15586 causes this issue. |
@swift-ci create |
CC @jckarter this looks pretty bad, no? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
[OS]
[Swift]
Swift version 5.5.1 (swift-5.5.1-RELEASE)
Target: x86_64-unknown-linux-gnu
Swift version 5.6-dev (LLVM 542eceb110d8480, Swift 4323d2f)
Target: x86_64-unknown-linux-gnu
Additional Detail from JIRA
md5: e271fa8e56c7610380594dd5d0974492
relates to:
timeval_t
import Foundation
hides declarations (derived from C) in other modules on Linux.Issue Description:
How to reproduce
Step 1: Prepare 2 files, "library.swift" and "user.swift" as following:
Step 2: Compile "library.swift" as a library named "MyLib"
Step 3: Compile "user.swift" and execute it.
swiftc user.swift -I. -L. -lMyLib && ./user
Results
macOS + Swift 5.5
"foo" is printed successfully.
Linux + Swift 5.5
Compilation fails like below:
The text was updated successfully, but these errors were encountered: