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

WII: Linking against libntfs.a throws some exceptions #4

Open
GoogleCodeExporter opened this issue Dec 30, 2015 · 2 comments
Open

WII: Linking against libntfs.a throws some exceptions #4

GoogleCodeExporter opened this issue Dec 30, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

I'am using DevKitPPC R26 for compiling my code. The Linker throws the following 
exceptions:
->
/opt/devkitpro/3rd/wii/lib/libntfs.a(security.o): In function 
`link_single_group.isra.6':
security.c:(.text.link_single_group.isra.6+0x20): undefined reference to 
`getgrgid'
/opt/devkitpro/3rd/wii/lib/libntfs.a(security.o): In function 
`ntfs_build_mapping':
security.c:(.text.ntfs_build_mapping+0x1f8): undefined reference to `getpwuid'
/opt/devkitpro/3rd/wii/lib/libntfs.a(security.o): In function 
`ntfs_initialize_file_security':
security.c:(.text.ntfs_initialize_file_security+0x34): undefined reference to 
`getuid'
security.c:(.text.ntfs_initialize_file_security+0x90): undefined reference to 
`getuid'
security.c:(.text.ntfs_initialize_file_security+0x98): undefined reference to 
`getgid'
security.c:(.text.ntfs_initialize_file_security+0xf8): undefined reference to 
`getuid'
/opt/devkitpro/3rd/wii/lib/libntfs.a(acls.o): In function 
`ntfs_do_user_mapping':
acls.c:(.text.ntfs_do_user_mapping+0x70): undefined reference to `getpwnam'
/opt/devkitpro/3rd/wii/lib/libntfs.a(acls.o): In function 
`ntfs_do_group_mapping':
acls.c:(.text.ntfs_do_group_mapping+0x94): undefined reference to `getgrnam'
collect2: ld returned 1 exit status
<-

Did I something wrong or newer DevKitPPC versions don't work anymore?


Original issue reported on code.google.com by [email protected] on 11 Nov 2014 at 11:12

@GoogleCodeExporter
Copy link
Author

The Linker throws that exception only if I use the flag:
-Wl,--no-gc-sections

Original comment by [email protected] on 18 Nov 2014 at 9:25

@GoogleCodeExporter
Copy link
Author

Yeah those uid/gid functions are not available anywhere in the devkit ppc 
packages. They are not used within the libntfs for the wii and therefore by 
default not linked in the application. This is because the garbace collector 
option "gc-sections" is by default enabled. If you turn it off explicitly, like 
in your case, it will try to link all function symbols found anywhere in the 
library which is not possible because these functions are not available.

To fix this problem the uid/gid functions need to be removed from the libntfs 
source code. I was trying to keep the ntfs-3g source code at its most possible 
original state because it is better maintainable that way. Therefore I did not 
remove anything that does not harm in the default build.

Original comment by [email protected] on 25 Mar 2015 at 9:31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant