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

Generate diskm8 using make.sh macOS but the executable couldn't be run #23

Open
wyatt-wong opened this issue Jan 23, 2025 · 2 comments
Open

Comments

@wyatt-wong
Copy link

wyatt-wong commented Jan 23, 2025

I cloned this GitHub source and tried to build it into binary by executing ./make.sh in macOS, on completion I obtained diskm8 and diskm8.exe

When I tried to execute diskm8 with ./diskm8 I got the following error. What am I missing ?

Image

Furthermore, I compared the file size of diskm8 compiled from source by make.sh and it is 4182533 bytes in my macOS. But when I download the latest binary from https://github.com/paleotronic/diskm8/releases/download/v0.6.1/diskm8-darwin-amd64.zip, I found the file size of diskm8 is 4522320 bytes.

I can run diskm8 downloaded from the pre-compiled binary without problems but I couldn't run the binary that was built by make.sh

@hippietrail
Copy link

It looks like the build script builds it for all platforms. Neither of those two files is the Mac one:

% file diskm8* 
diskm8:     ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), statically linked, for FreeBSD 12.3, FreeBSD-style, Go BuildID=xGVhY9XbD3VG8HQPUNY0/_-GdmYKl32_2jjPvj5sE/wzeyqbvzjxiXwwyX9-vr/QOvJggTElLWosGqnf1rR, with debug_info, not stripped
diskm8.exe: PE32+ executable (console) Aarch64, for MS Windows

It looks like each build simply overwrites the previous ones but the last ones are not cleaned up. But it made Zips of each build as it went, so look in:

publish/diskm8-darwin-amd64.zip
publish/diskm8-darwin-arm64.zip

And you'll find:

% zipinfo publish/diskm8-darwin-amd64.zip 
Archive:  publish/diskm8-darwin-amd64.zip
Zip file size: 2729462 bytes, number of entries: 4
-rwxr-xr-x  3.0 unx  4774384 bx defN 25-Jan-23 13:32 diskm8
-rw-r--r--  3.0 unx    35141 tx defN 25-Jan-23 13:31 LICENSE
-rw-r--r--  3.0 unx     7183 tx defN 25-Jan-23 13:31 README.md
-rw-r--r--  3.0 unx      487 tx defN 25-Jan-23 13:31 USAGE.md
4 files, 4817195 bytes uncompressed, 2728868 bytes compressed:  43.4%
% zipinfo publish/diskm8-darwin-arm64.zip 
Archive:  publish/diskm8-darwin-arm64.zip
Zip file size: 2602578 bytes, number of entries: 4
-rwxr-xr-x  3.0 unx  4662802 bx defN 25-Jan-23 13:32 diskm8
-rw-r--r--  3.0 unx    35141 tx defN 25-Jan-23 13:31 LICENSE
-rw-r--r--  3.0 unx     7183 tx defN 25-Jan-23 13:31 README.md
-rw-r--r--  3.0 unx      487 tx defN 25-Jan-23 13:31 USAGE.md
4 files, 4705613 bytes uncompressed, 2601984 bytes compressed:  44.7%

@wyatt-wong
Copy link
Author

It looks like the build script builds it for all platforms. Neither of those two files is the Mac one:

% file diskm8* 
diskm8:     ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), statically linked, for FreeBSD 12.3, FreeBSD-style, Go BuildID=xGVhY9XbD3VG8HQPUNY0/_-GdmYKl32_2jjPvj5sE/wzeyqbvzjxiXwwyX9-vr/QOvJggTElLWosGqnf1rR, with debug_info, not stripped
diskm8.exe: PE32+ executable (console) Aarch64, for MS Windows

It looks like each build simply overwrites the previous ones but the last ones are not cleaned up. But it made Zips of each build as it went, so look in:

publish/diskm8-darwin-amd64.zip
publish/diskm8-darwin-arm64.zip

And you'll find:

% zipinfo publish/diskm8-darwin-amd64.zip 
Archive:  publish/diskm8-darwin-amd64.zip
Zip file size: 2729462 bytes, number of entries: 4
-rwxr-xr-x  3.0 unx  4774384 bx defN 25-Jan-23 13:32 diskm8
-rw-r--r--  3.0 unx    35141 tx defN 25-Jan-23 13:31 LICENSE
-rw-r--r--  3.0 unx     7183 tx defN 25-Jan-23 13:31 README.md
-rw-r--r--  3.0 unx      487 tx defN 25-Jan-23 13:31 USAGE.md
4 files, 4817195 bytes uncompressed, 2728868 bytes compressed:  43.4%
% zipinfo publish/diskm8-darwin-arm64.zip 
Archive:  publish/diskm8-darwin-arm64.zip
Zip file size: 2602578 bytes, number of entries: 4
-rwxr-xr-x  3.0 unx  4662802 bx defN 25-Jan-23 13:32 diskm8
-rw-r--r--  3.0 unx    35141 tx defN 25-Jan-23 13:31 LICENSE
-rw-r--r--  3.0 unx     7183 tx defN 25-Jan-23 13:31 README.md
-rw-r--r--  3.0 unx      487 tx defN 25-Jan-23 13:31 USAGE.md
4 files, 4705613 bytes uncompressed, 2601984 bytes compressed:  44.7%

Then why diskm8 for Linux and diskm8.exe appeared under diskm8 source folder ? It confuse people that the diskm8 was the macOS version. And there is NO mention in the README.md file that the macOS version was compressed and relocated into the diskm8/publish folder.

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

No branches or pull requests

2 participants