Skip to content
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

[iOS] Missing symbols building System.Drawing.Common.dll[.o] for arm64 #50384

Closed
spouliot opened this issue Mar 29, 2021 · 5 comments
Closed
Milestone

Comments

@spouliot
Copy link
Contributor

Description

System.Drawing.Common.dll used to have only a few types in old Xamarin legacy days.

The new version seems more complete in the recent (P3) builds, including symbols that are not available on iOS.

Some seems to be symbols for made for macOS (?) wrapper_managed_to_native_System_Drawing_MacSupport_CGMainDisplayID but there's no native code so the build fails at (native) link time.

Configuration

Repo: xamarin-macios, main (HEAD) using 6.0.100-preview.3.21161.23 [1]
Building project for devices (arm64) AOT for iOS 64 bits.

[1] we cannot bump to a newer build due to #50245

Regression?

Yes, this was working the the P2 builds.
The previous, working version was 6.0.100-preview.2.21155.3

Other information

14:18:53.6502320                      Undefined symbols for architecture arm64:
14:18:53.6503080                        "_AbortDoc", referenced from:
14:18:53.6503400                            wrapper_managed_to_native_System_Drawing_SafeNativeMethods_AbortDoc_System_Runtime_InteropServices_HandleRef in System.Drawing.Common.dll.o
14:18:53.6504410                        "_AddFontResourceEx", referenced from:
14:18:53.6504720                            wrapper_managed_to_native_System_Drawing_SafeNativeMethods_AddFontResourceEx_string_int_intptr in System.Drawing.Common.dll.o
14:18:53.6504990                        "_CGDisplayBounds", referenced from:
14:18:53.6505230                            wrapper_managed_to_native_System_Drawing_MacSupport_CGDisplayBounds_intptr in System.Drawing.Common.dll.o
14:18:53.6505470                        "_CGMainDisplayID", referenced from:
14:18:53.6505710                            wrapper_managed_to_native_System_Drawing_MacSupport_CGMainDisplayID in System.Drawing.Common.dll.o
14:18:53.6505960                        "_CopyImage", referenced from:
14:18:53.6506200                            wrapper_managed_to_native_System_Drawing_SafeNativeMethods_CopyImage_System_Runtime_InteropServices_HandleRef_int_int_int_int in System.Drawing.Common.dll.o
14:18:53.6506450                        "_CreateCGContextForPort", referenced from:
14:18:53.6507370                            wrapper_managed_to_native_System_Drawing_MacSupport_CreateCGContextForPort_intptr_intptr_ in System.Drawing.Common.dll.o
14:18:53.6507920                        "_CreateCompatibleBitmap", referenced from:
14:18:53.6508790                            wrapper_managed_to_native_System_Drawing_SafeNativeMethods_CreateCompatibleBitmap_System_Runtime_InteropServices_HandleRef_int_int in System.Drawing.Common.dll.o
14:18:53.6509040                        "_CreateDIBSection", referenced from:
14:18:53.6509390                            wrapper_managed_to_native_System_Drawing_SafeNativeMethods_CreateDIBSection_System_Runtime_InteropServices_HandleRef_System_Drawing_NativeMethods_BITMAPINFO_FLAT__int_intptr__intptr_int in System.Drawing.Common.dll.o
14:18:53.6509600                        "_CreateIconFromResourceEx", referenced from:
14:18:53.6509800                            wrapper_managed_to_native_System_Drawing_SafeNativeMethods_CreateIconFromResourceEx_byte__uint_bool_int_int_int_int in System.Drawing.Common.dll.o
14:18:53.6510000                        "_DestroyIcon", referenced from:
14:18:53.6510850                            wrapper_managed_to_native_System_Drawing_SafeNativeMethods_DestroyIcon_System_Runtime_InteropServices_HandleRef in System.Drawing.Common.dll.o
14:18:53.6511110                        "_DeviceCapabilities", referenced from:
14:18:53.6511320                            wrapper_managed_to_native_System_Drawing_SafeNativeMethods_DeviceCapabilities_string_string_int16_intptr_intptr in 
...
@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Mar 29, 2021
@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@spouliot
Copy link
Contributor Author

There were recent changes wrt native symbols for that assembly
#49405

@spouliot
Copy link
Contributor Author

Put an hold on triaging.

This might be due to a workaround for another (long fixed) issue that somehow (w/P3) gets us to include the wrong code. I'll confirm that in the morning...

@ghost
Copy link

ghost commented Mar 30, 2021

Tagging subscribers to this area: @safern, @tarekgh
See info in area-owners.md if you want to be subscribed.

Issue Details

Description

System.Drawing.Common.dll used to have only a few types in old Xamarin legacy days.

The new version seems more complete in the recent (P3) builds, including symbols that are not available on iOS.

Some seems to be symbols for made for macOS (?) wrapper_managed_to_native_System_Drawing_MacSupport_CGMainDisplayID but there's no native code so the build fails at (native) link time.

Configuration

Repo: xamarin-macios, main (HEAD) using 6.0.100-preview.3.21161.23 [1]
Building project for devices (arm64) AOT for iOS 64 bits.

[1] we cannot bump to a newer build due to #50245

Regression?

Yes, this was working the the P2 builds.
The previous, working version was 6.0.100-preview.2.21155.3

Other information

14:18:53.6502320                      Undefined symbols for architecture arm64:
14:18:53.6503080                        "_AbortDoc", referenced from:
14:18:53.6503400                            wrapper_managed_to_native_System_Drawing_SafeNativeMethods_AbortDoc_System_Runtime_InteropServices_HandleRef in System.Drawing.Common.dll.o
14:18:53.6504410                        "_AddFontResourceEx", referenced from:
14:18:53.6504720                            wrapper_managed_to_native_System_Drawing_SafeNativeMethods_AddFontResourceEx_string_int_intptr in System.Drawing.Common.dll.o
14:18:53.6504990                        "_CGDisplayBounds", referenced from:
14:18:53.6505230                            wrapper_managed_to_native_System_Drawing_MacSupport_CGDisplayBounds_intptr in System.Drawing.Common.dll.o
14:18:53.6505470                        "_CGMainDisplayID", referenced from:
14:18:53.6505710                            wrapper_managed_to_native_System_Drawing_MacSupport_CGMainDisplayID in System.Drawing.Common.dll.o
14:18:53.6505960                        "_CopyImage", referenced from:
14:18:53.6506200                            wrapper_managed_to_native_System_Drawing_SafeNativeMethods_CopyImage_System_Runtime_InteropServices_HandleRef_int_int_int_int in System.Drawing.Common.dll.o
14:18:53.6506450                        "_CreateCGContextForPort", referenced from:
14:18:53.6507370                            wrapper_managed_to_native_System_Drawing_MacSupport_CreateCGContextForPort_intptr_intptr_ in System.Drawing.Common.dll.o
14:18:53.6507920                        "_CreateCompatibleBitmap", referenced from:
14:18:53.6508790                            wrapper_managed_to_native_System_Drawing_SafeNativeMethods_CreateCompatibleBitmap_System_Runtime_InteropServices_HandleRef_int_int in System.Drawing.Common.dll.o
14:18:53.6509040                        "_CreateDIBSection", referenced from:
14:18:53.6509390                            wrapper_managed_to_native_System_Drawing_SafeNativeMethods_CreateDIBSection_System_Runtime_InteropServices_HandleRef_System_Drawing_NativeMethods_BITMAPINFO_FLAT__int_intptr__intptr_int in System.Drawing.Common.dll.o
14:18:53.6509600                        "_CreateIconFromResourceEx", referenced from:
14:18:53.6509800                            wrapper_managed_to_native_System_Drawing_SafeNativeMethods_CreateIconFromResourceEx_byte__uint_bool_int_int_int_int in System.Drawing.Common.dll.o
14:18:53.6510000                        "_DestroyIcon", referenced from:
14:18:53.6510850                            wrapper_managed_to_native_System_Drawing_SafeNativeMethods_DestroyIcon_System_Runtime_InteropServices_HandleRef in System.Drawing.Common.dll.o
14:18:53.6511110                        "_DeviceCapabilities", referenced from:
14:18:53.6511320                            wrapper_managed_to_native_System_Drawing_SafeNativeMethods_DeviceCapabilities_string_string_int16_intptr_intptr in 
...
Author: spouliot
Assignees: -
Labels:

area-System.Drawing, untriaged

Milestone: -

@marek-safar marek-safar added the os-ios Apple iOS label Mar 30, 2021
@marek-safar marek-safar added this to the 6.0.0 milestone Mar 30, 2021
@marek-safar marek-safar removed the untriaged New issue has not been triaged by the area owner label Mar 30, 2021
@spouliot
Copy link
Contributor Author

spouliot commented Apr 1, 2021

Not a problem now that the (old, now unneeded) workaround was removed. Closing.

@spouliot spouliot closed this as completed Apr 1, 2021
@ghost ghost locked as resolved and limited conversation to collaborators May 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants