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

Prebuilt binary for Linux with phosg prelinked #62

Closed
hyperhello opened this issue Nov 26, 2022 · 2 comments
Closed

Prebuilt binary for Linux with phosg prelinked #62

hyperhello opened this issue Nov 26, 2022 · 2 comments

Comments

@hyperhello
Copy link

I'm trying to pull the pictures and sounds out of old HyperCard stacks in an environment where I don't have root/sudo so I can't install phosg as a library.

I've been playing with the make files to try to merge the two codebases. There's probably a trick to make it easy, since the macOS release.zip has all the binaries and they seem to run. Can we have a Debian release?

@Kristine1975
Copy link
Contributor

You can specify the location of phosg by defining the cmake variable PHOSG_DIR, e.g. when you have phosg in a directory parallel to resource_dasm:

 cmake -DPHOSG_DIR=../phosg .

Note that for that to work there must be a symlink (or hardlink) inside the phosg directory called "phosg" that points to "src" like so:

ln -s src phosg

See:

# phosg library in custom location?
if (PHOSG_DIR)
# (requires symlink "phosg" -> "src" in phosg directory)
include_directories(${PHOSG_DIR})
link_directories(${PHOSG_DIR})
else()
find_package(phosg REQUIRED)
endif()

@hyperhello
Copy link
Author

hyperhello commented Nov 28, 2022

That worked to link and run resource_dasm. Thank you very much. However I wasn't able to link the one after, m68kdasm. I'll keep trying, maybe there's an include or a config issue on my system.
[ 62%] Linking CXX executable m68kdasm
/usr/bin/ld: CMakeFiles/m68kdasm.dir/src/m68kdasm.cc.o: in function std::thread::thread<void (&)(std::function<bool (unsigned long, unsigned long)>&, std::atomic<unsigned long>&, std::atomic<unsigned long>&, unsigned long, unsigned long), std::reference_wrapper<std::function<bool (unsigned long, unsigned long)> >, std::reference_wrapper<std::atomic<unsigned long> >, std::reference_wrapper<std::atomic<unsigned long> >, unsigned long&, unsigned long, void>(void (&)(std::function<bool (unsigned long, unsigned long)>&, std::atomic<unsigned long>&, std::atomic<unsigned long>&, unsigned long, unsigned long), std::reference_wrapper<std::function<bool (unsigned long, unsigned long)> >&&, std::reference_wrapper<std::atomic<unsigned long> >&&, std::reference_wrapper<std::atomic<unsigned long> >&&, unsigned long&, unsigned long&&)': /usr/include/c++/9/thread:126: undefined reference to pthread_create'

Edit: I added the following and succeeded.

set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
add_executable(m68kdasm src/m68kdasm.cc)
target_link_libraries(m68kdasm PRIVATE Threads::Threads resource_file)

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