Skip to content

Fix compile error and host string parsing on macOS #16

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

turley
Copy link

@turley turley commented Jul 3, 2024

This fixes an error when compiling under recent versions of macOS (wrong type passed to mkdir).

It also fixes a network connection error that looks like:

Failed to connect
libsacdread: Can't open x.x.x.x:2002 for reading

The original substr(target, 0, strchr(target, ':') - target) was causing the host/ip string to be truncated (at least on macOS), so it wasn't able to connect to the actual host.

@chris-l-waters
Copy link

changing this gets me further down the road of compiling, but not past the gate.

user@Mac-mini sacd_extract % make
[  2%] Linking C executable sacd_extract
ld: warning: alignment (1) of atom '_ServerRequest_fields' (/Users/user/Downloads/sacd-ripper-master/tools/sacd_extract/CMakeFiles/sacd_extract.dir/Users/user/Downloads/sacd-ripper-master/libs/libsacd/sacd_ripper.pb.c.o) is too small and may result in unaligned pointers 
ld: pointer not aligned in '_ServerRequest_fields'+0x1A (/Users/user/Downloads/sacd-ripper-master/tools/sacd_extract/CMakeFiles/sacd_extract.dir/Users/user/Downloads/sacd-ripper-master/libs/libsacd/sacd_ripper.pb.c.o)
cc: error: linker command failed with exit code 1 (use -v to see invocation)

M4 mac mini.

@turley
Copy link
Author

turley commented Nov 29, 2024

@chris-l-waters That appears to be the issue described in #12. You might have luck trying the suggestions there, but I got past it by doing MACOSX_DEPLOYMENT_TARGET=11 make

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

Successfully merging this pull request may close these issues.

2 participants