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

32-bit Build #201

Open
megatog615 opened this issue Jan 3, 2025 · 11 comments
Open

32-bit Build #201

megatog615 opened this issue Jan 3, 2025 · 11 comments

Comments

@megatog615
Copy link

I run Linux on a Pentium III system. It's my only system with an IDE controller and (IDE) DVD drive. I have tried to build redumper on it, which takes all night, only to fail with clang running out of memory. I've tried building it in a VM as well and it still runs out of memory with 4GB allocated. Is there something that I'm missing that can alleviate this?

@Deterous
Copy link
Contributor

Deterous commented Jan 3, 2025

Cross compilation on a more powerful system should be possible, you might be able to tweak the GitHub workflow to do it.

But before going through that effort, it is quite easy to use IDE-USB adapters on modern computers. Most redump dumpers use those with no issues.

@megatog615
Copy link
Author

I have tried so many different invocations of cmake and haven't been successful. Do you have any ideas for cross-compiling?

@superg
Copy link
Owner

superg commented Jan 3, 2025

Any success running precompiled 32-bit binary?
EDIT: ah, I build 32-bit only for Windows :)
You can try incremental build. I think the problem is that by default, ninja is doing parallel builds (ninja is invoked by cmake --build). Instead of doing that, try to invoke ninja with -j 1 option.

@megatog615
Copy link
Author

I haven't had any success compiling it for 32-bit Linux at all.

@superg
Copy link
Owner

superg commented Jan 3, 2025

Try incremental build. I think the problem is that by default, ninja is doing parallel builds (ninja is invoked by cmake --build). Instead of doing that, try to invoke ninja with -j 1 option in the root build directory where you run cmake --build.

@megatog615
Copy link
Author

I've already tried that. It literally tries to use over 4GB of ram on one job, redumper.ixx near the very end of the build process.

@superg
Copy link
Owner

superg commented Jan 3, 2025

Huh, maybe it's linking that eats all the memory. Increasing swap size might help but that might be tedious.
I will consider auto building 32-bit linux binary as well, but that will take some time as I have other more important issues to take care of.

@megatog615
Copy link
Author

megatog615 commented Jan 4, 2025

Since the disk that I'm using in the system is comically large(1TB SSD is all I had when I built this retro system), I gave it a 32GB swap partition. I figured the large size of the drive would lend itself well to backing up my CD and DVD collection which brought me to this project. The system is maxed-out at 1GB of RAM. My feeling is that even with PAE, programs still can't use more than 3.something GB.

@superg
Copy link
Owner

superg commented Jan 4, 2025

Ha, this is good observation, I keep forgetting that on 32-bit system you can only address 4Gb per process.
Well, then no solution other than cross compiling :(

@megatog615
Copy link
Author

If I knew what the correct invocation of cmake to enable cross-compiling to 32 on Linux I would do it.

@superg
Copy link
Owner

superg commented Jan 4, 2025

It will likely require cmake -DCMAKE_CXX_FLAGS "-m32" -DCMAKE_C_FLAGS "-m32" in addition to other generation options and potentially something else. Gladly redumper doesn't link to anything except glibc and libc++, you will likely need to have 32-bit counterparts installed on your 64-bit linux system in order to link correctly.

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

3 participants