Giter Site home page Giter Site logo

Comments (14)

Marin-MK avatar Marin-MK commented on June 10, 2024 1

Using ls -l returns:
-rwxr-xr-x 1 marin marin 22788256 9 20:39 mkxp.x86_64

The prebuilt mkxp.amd64 and mkxp.x86 both have -rwxrwx---.

Notable is also that the file type is "Unknown" as opposed to "Program", and that it doesn't have a thumbnail in the file explorer.

from mkxp.

sorlok avatar sorlok commented on June 10, 2024 1

I realize it's been forever, but thanks to @Marin-MK for tracking this down and debugging it. I've updated the guide with your notes.

from mkxp.

carstene1ns avatar carstene1ns commented on June 10, 2024

General question is why do you link ruby statically and not dynamically like the rest?
This way you either need to build ruby without dlopen capability, or add -ldl to the linker.

from mkxp.

Marin-MK avatar Marin-MK commented on June 10, 2024

I'm completely in the dark without a guide, and the guide author says he had trouble with doing it dynamically. Since I don't even know how that works, I'm just following the guide I linked.

Could you either tell me where I should add -ldl to the linker, or how to build Ruby dynamically (and how to then include it mkxp or whatever)? Thanks for you help.

from mkxp.

carstene1ns avatar carstene1ns commented on June 10, 2024

For a quick fix, you can add it like you added the static ruby library (just add another line with -ldl in CMakeLists.txt after it).
Also, can you upload your CMakeCache.txt? Just drag/drop it into the editor field here, it will be uploaded.

from mkxp.

Marin-MK avatar Marin-MK commented on June 10, 2024

CMakeCache.txt

from mkxp.

Marin-MK avatar Marin-MK commented on June 10, 2024

I'm now getting a different error:

/usr/bin/ld: /usr/local/lib/libruby-static.a(thread.o): undefined reference to symbol 'pthread_setname_np@@GLIBC_2.12'
//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
CMakeFiles/mkxp.dir/build.make:1766: recipe for target 'mkxp.bin.x86_64' failed
make[2]: *** [mkxp.bin.x86_64] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/mkxp.dir/all' failed
make[1]: *** [CMakeFiles/mkxp.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

New CMakeCache: CMakeCache.txt

Bottom of my CMakeLists.txt:

target_link_libraries(${PROJECT_NAME}
	${SIGCXX_LIBRARIES}
	${SDL2_LIBRARIES}
	${SDL2_IMAGE_LIBRARIES}
	${SDL2_TTF_LIBRARIES}
	${SDL_SOUND_LIBRARIES}
	${PHYSFS_LIBRARIES}
	${PIXMAN_LIBRARIES}
	${Boost_LIBRARIES}
	${MRI_LIBRARIES}
	${VORBISFILE_LIBRARIES}
	${FLUID_LIBRARIES}
	${OPENAL_LIBRARY}
	${ZLIB_LIBRARY}

	${PLATFORM_LIBRARIES}
	/usr/local/lib/libruby-static.a
	-ldl
)

PostBuildMacBundle(${PROJECT_NAME} "" "${PLATFORM_COPY_LIBS}")

from mkxp.

Ancurio avatar Ancurio commented on June 10, 2024

from mkxp.

carstene1ns avatar carstene1ns commented on June 10, 2024

Well this does only matter, because of manually adding the static library.
The pkg-config file has them included.

from mkxp.

Marin-MK avatar Marin-MK commented on June 10, 2024

Added -lpthread underneath -ldl and it raises yet another error.

/usr/bin/ld: /usr/local/lib/libruby-static.a(thread.o): undefined reference to symbol 'timer_settime@@GLIBC_2.3.3'
//lib/x86_64-linux-gnu/librt.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
CMakeFiles/mkxp.dir/build.make:1766: recipe for target 'mkxp.bin.x86_64' failed
make[2]: *** [mkxp.bin.x86_64] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/mkxp.dir/all' failed
make[1]: *** [CMakeFiles/mkxp.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

I clearly don't know what I'm doing anymore, so could someone explain how to dynamically link Ruby instead of statically? And then any differences with compiling mkxp with ruby statically and dynamically. That'd be very much appreciated.

from mkxp.

Ancurio avatar Ancurio commented on June 10, 2024

@Marin-MK The manpages tell me timer_settime requires -lrt. You could alternatively try using the dependency kit as described in the Readme, if you're just trying to hack on mkxp.

from mkxp.

TomTheDragon avatar TomTheDragon commented on June 10, 2024

I basicly tried the same thing as @Marin-MK but i only could get it to work with Ruby v2.2.x - v2.5.x (i tried v2.1.x, v2.2.x, v2.3.x, v2.4.x, v2.5.x and v2.6.x)
But even then, i still encountered a strange problem, as you can see here --> #217
If i finally get it to work, i plan on making something like a docker container, which should make compiling much easier.

from mkxp.

Marin-MK avatar Marin-MK commented on June 10, 2024

@Marin-MK The manpages tell me timer_settime requires -lrt. You could alternatively try using the dependency kit as described in the Readme, if you're just trying to hack on mkxp.

My main goal is to slightly alter mkxp's source code. For that I wanted to use the hack at first, but I couldn't get it to work either. That's why I tried compiling it from source.

Having added -lrt, -lgmp, and -lcrypt, it's now fully compiled and it looks like it works perfectly!

Only thing is that it keeps asking me how to run the file as you can see.
I did check the "Allow to execute this file" checkbox in Permissions, and I also tried via the command line with sudo chmod +x ./mkxpa.x86_64. Any idea how I can get rid of that?

from mkxp.

Ancurio avatar Ancurio commented on June 10, 2024

Any idea how I can get rid of that?

No clue; seems like it's related to the executable bit. You can check with ls -l if it's properly set.

My main goal is to slightly alter mkxp's source code.

That's precisely why I made the depkit for..

from mkxp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.