is there any way to support X86 - X64 machines ? #1

Closed
opened 2026-01-29 21:57:33 +00:00 by claunia · 3 comments
Owner

Originally created by @jusdMustafa on GitHub (Nov 9, 2024).

hi there, i've been try to build this project so i instaed the llvm, lld, python, gcc, cmake, from brew.sh but the llvm-objcopy is for arm64 and my machine is X86 - X64 so is there anyway to work around this ?

mustafa@Mustafas-MacBook-Pro macos-btrfs % make macos -b   
/Library/Developer/CommandLineTools/usr/bin/make -C kernel/macos
/Library/Developer/CommandLineTools/usr/bin/cc -mmacosx-version-min=10.15 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -arch x86_64 -nostdlib -Xlinker -kext -Xlinker -object_path_lto -Xlinker -export_dynamic -lkmod -lcc_kext -o macos_btrfs.out 
ld: warning: argument missing after -object_path_lto
ld: warning: object file (/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libkmod.a(c_start.o)) was built for newer macOS version (15.1) than being linked (10.15)
ld: warning: object file (/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libkmod.a(c_stop.o)) was built for newer macOS version (15.1) than being linked (10.15)
otool -h macos_btrfs.out
macos_btrfs.out:
Mach header
      magic  cputype cpusubtype  caps    filetype ncmds sizeofcmds      flags
 0xfeedfacf 16777223          3  0x00          11     6        288 0x00000085
otool -l macos_btrfs.out | grep uuid
    uuid 219003A3-57FE-314B-9101-8A48C0B28ED1
mkdir -p macos_btrfs.kext/Contents/MacOS
mv macos_btrfs.out macos_btrfs.kext/Contents/MacOS/macos_btrfs
# Clear placeholders(o.w. kextlibs cannot parse)
sed 's/__KEXTLIBS__//g' Info.plist~ > macos_btrfs.kext/Contents/Info.plist
awk '/__KEXTLIBS__/{system("kextlibs -xml -c -unsupported -undef-symbols macos_btrfs.kext");next};1' Info.plist~ > macos_btrfs.kext/Contents/Info.plist~
Can't record kext in identifier lookup dictionary; no identifier.
Can't record kext in identifier lookup dictionary; no identifier.

mv macos_btrfs.kext/Contents/Info.plist~ macos_btrfs.kext/Contents/Info.plist
# Empty-dependency kext cannot be load  so we add one if necessary
/usr/libexec/PlistBuddy -c 'Print OSBundleLibraries' macos_btrfs.kext/Contents/Info.plist &> /dev/null || \
		/usr/libexec/PlistBuddy -c 'Add :OSBundleLibraries:com.apple.kpi.bsd string "9.0.0"' macos_btrfs.kext/Contents/Info.plist
touch macos_btrfs.kext
/usr/libexec/PlistBuddy -c 'Add :OSBundleLibraries:com.apple.kext.triggers string "1.0.0d1"' macos_btrfs.kext/Contents/Info.plist
/usr/libexec/PlistBuddy -c 'Add :OSBundleLibraries:com.apple.kpi.iokit string "9.0.0"' macos_btrfs.kext/Contents/Info.plist
/usr/libexec/PlistBuddy -c 'Add :OSBundleLibraries:com.apple.kpi.libkern string "9.0.0"' macos_btrfs.kext/Contents/Info.plist
/usr/libexec/PlistBuddy -c 'Add :OSBundleLibraries:com.apple.kpi.mach string "9.0.0"' macos_btrfs.kext/Contents/Info.plist
/usr/libexec/PlistBuddy -c 'Add :OSBundleLibraries:com.apple.kpi.unsupported string "9.0.0"' macos_btrfs.kext/Contents/Info.plist
dsymutil -arch x86_64 -o macos_btrfs.kext.dSYM macos_btrfs.kext/Contents/MacOS/macos_btrfs
warning: no debug symbols in executable (-arch x86_64)
/Library/Developer/CommandLineTools/usr/bin/make -C tools
make[1]: *** No targets specified and no makefile found.  Stop.
make: *** [macos] Error 2

My machine : Lenovo ThinkPad L590 ( Hackintosh )
OS : Sonoma 14.7.1
Kernal : Darwin 23.6.0

Originally created by @jusdMustafa on GitHub (Nov 9, 2024). hi there, i've been try to build this project so i instaed the llvm, lld, python, gcc, cmake, from brew.sh but the llvm-objcopy is for arm64 and my machine is X86 - X64 so is there anyway to work around this ? ```shell log mustafa@Mustafas-MacBook-Pro macos-btrfs % make macos -b /Library/Developer/CommandLineTools/usr/bin/make -C kernel/macos /Library/Developer/CommandLineTools/usr/bin/cc -mmacosx-version-min=10.15 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -arch x86_64 -nostdlib -Xlinker -kext -Xlinker -object_path_lto -Xlinker -export_dynamic -lkmod -lcc_kext -o macos_btrfs.out ld: warning: argument missing after -object_path_lto ld: warning: object file (/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libkmod.a(c_start.o)) was built for newer macOS version (15.1) than being linked (10.15) ld: warning: object file (/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libkmod.a(c_stop.o)) was built for newer macOS version (15.1) than being linked (10.15) otool -h macos_btrfs.out macos_btrfs.out: Mach header magic cputype cpusubtype caps filetype ncmds sizeofcmds flags 0xfeedfacf 16777223 3 0x00 11 6 288 0x00000085 otool -l macos_btrfs.out | grep uuid uuid 219003A3-57FE-314B-9101-8A48C0B28ED1 mkdir -p macos_btrfs.kext/Contents/MacOS mv macos_btrfs.out macos_btrfs.kext/Contents/MacOS/macos_btrfs # Clear placeholders(o.w. kextlibs cannot parse) sed 's/__KEXTLIBS__//g' Info.plist~ > macos_btrfs.kext/Contents/Info.plist awk '/__KEXTLIBS__/{system("kextlibs -xml -c -unsupported -undef-symbols macos_btrfs.kext");next};1' Info.plist~ > macos_btrfs.kext/Contents/Info.plist~ Can't record kext in identifier lookup dictionary; no identifier. Can't record kext in identifier lookup dictionary; no identifier. mv macos_btrfs.kext/Contents/Info.plist~ macos_btrfs.kext/Contents/Info.plist # Empty-dependency kext cannot be load so we add one if necessary /usr/libexec/PlistBuddy -c 'Print OSBundleLibraries' macos_btrfs.kext/Contents/Info.plist &> /dev/null || \ /usr/libexec/PlistBuddy -c 'Add :OSBundleLibraries:com.apple.kpi.bsd string "9.0.0"' macos_btrfs.kext/Contents/Info.plist touch macos_btrfs.kext /usr/libexec/PlistBuddy -c 'Add :OSBundleLibraries:com.apple.kext.triggers string "1.0.0d1"' macos_btrfs.kext/Contents/Info.plist /usr/libexec/PlistBuddy -c 'Add :OSBundleLibraries:com.apple.kpi.iokit string "9.0.0"' macos_btrfs.kext/Contents/Info.plist /usr/libexec/PlistBuddy -c 'Add :OSBundleLibraries:com.apple.kpi.libkern string "9.0.0"' macos_btrfs.kext/Contents/Info.plist /usr/libexec/PlistBuddy -c 'Add :OSBundleLibraries:com.apple.kpi.mach string "9.0.0"' macos_btrfs.kext/Contents/Info.plist /usr/libexec/PlistBuddy -c 'Add :OSBundleLibraries:com.apple.kpi.unsupported string "9.0.0"' macos_btrfs.kext/Contents/Info.plist dsymutil -arch x86_64 -o macos_btrfs.kext.dSYM macos_btrfs.kext/Contents/MacOS/macos_btrfs warning: no debug symbols in executable (-arch x86_64) /Library/Developer/CommandLineTools/usr/bin/make -C tools make[1]: *** No targets specified and no makefile found. Stop. make: *** [macos] Error 2 ``` My machine : Lenovo ThinkPad L590 ( Hackintosh ) OS : Sonoma 14.7.1 Kernal : Darwin 23.6.0
Author
Owner

@relalis commented on GitHub (Nov 9, 2024):

I'm in the process of rewriting this kext, and have been focusing on FreeBSD because it's faster to test in a kpanic. The reason you're failing to build it is because there's nothing to build for a macOS target; if you're expecting a functional BTRFS driver, this is unlikely to be your project (unless you get really lucky and I stop being lazy)

I have some commits I'd like to push for basic VFS reading but my build server lost its PSU and I'm unfortunately traveling; give me a couple of weeks.

@relalis commented on GitHub (Nov 9, 2024): I'm in the process of rewriting this kext, and have been focusing on FreeBSD because it's faster to test in a kpanic. The reason you're failing to build it is because there's _nothing_ to build for a macOS target; if you're expecting a functional BTRFS driver, this is unlikely to be your project (unless you get really lucky and I stop being lazy) I have some commits I'd like to push for basic VFS reading but my build server lost its PSU and I'm unfortunately traveling; give me a couple of weeks.
Author
Owner

@jusdMustafa commented on GitHub (Nov 11, 2024):

I'm in the process of rewriting this kext, and have been focusing on FreeBSD because it's faster to test in a kpanic. The reason you're failing to build it is because there's nothing to build for a macOS target; if you're expecting a functional BTRFS driver, this is unlikely to be your project (unless you get really lucky and I stop being lazy)

I have some commits I'd like to push for basic VFS reading but my build server lost its PSU and I'm unfortunately traveling; give me a couple of weeks.

Ok, but they didn't mention this project doesn't support X86_x64 machines recently at least. Thanks for responding

@jusdMustafa commented on GitHub (Nov 11, 2024): > I'm in the process of rewriting this kext, and have been focusing on FreeBSD because it's faster to test in a kpanic. The reason you're failing to build it is because there's _nothing_ to build for a macOS target; if you're expecting a functional BTRFS driver, this is unlikely to be your project (unless you get really lucky and I stop being lazy) > > I have some commits I'd like to push for basic VFS reading but my build server lost its PSU and I'm unfortunately traveling; give me a couple of weeks. Ok, but they didn't mention this project doesn't support X86_x64 machines recently at least. Thanks for responding
Author
Owner

@relalis commented on GitHub (Nov 11, 2024):

I don't believe I have any architecture-specific code. The FreeBSD module is targeted at x86_64 and the macOS module will as well.

@relalis commented on GitHub (Nov 11, 2024): I don't believe I have any architecture-specific code. The FreeBSD module is targeted at x86_64 and the macOS module will as well.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/macos-btrfs#1