Skip to content

Fix compile error and host string parsing on macOS#16

Open
turley wants to merge 1 commit intosetmind:masterfrom
turley:master
Open

Fix compile error and host string parsing on macOS#16
turley wants to merge 1 commit intosetmind:masterfrom
turley:master

Conversation

@turley
Copy link
Copy Markdown

@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
Copy Markdown

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
Copy Markdown
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