Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Updating. I am currently facing two massive related to 32bit execution
1)C++ programs fails to execute due to Segmentation fault.
I believed it could be because I only had a symbolic link in /usr/lib32 to my Gcc's libstdc++.so and not to anything else related to that gcc, but I created symbolic links to everything in Gcc's lib32 dir to /usr/lib32, executed ldconfig and it didn't change anything.
I also tried to run:
Code:
gdb c++-program
but received:
Quote:
Reading symbols from /media/34GB/c++-program...Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /media/34GB/c++-program]
2)I can't run 32bit executable files (c or c++) directly, because it returns:
PHP Code:
bash: ./c-program: No such file or directory
Instead I have to call the linker directly. I don't understand why, as I said, I already created sym links from Glibc's lib dir to /usr/lib32, edited ld.conf.so and executed ldconfig. And this works in another occasions, as when I run configure scripts adjusted for 32bit building.
What you wrote is not enough to help you. Obviously you made some mistakes during the creation of your programs (both c and c++), just it is not visible from here.
1. you must not mix 32 and 64 bit code, that will not work (32bit app cannot use 64bit lib for example).
2. about dwarf: https://stackoverflow.com/questions/...-4-should-be-2
3. I guess creating those symlinks is not a good idea, but obviously I can't see the result, so I'm not really sure about that.
I cannot imagine that I would or could EVER have created the mess you find yourself in now.
That said, if I DID have a system like that I would proceed this way:
1. Back up my home and development folders and my personal account. Record or back up some settings, such as sudoers, sshd, etc. Twice. To different media and possibly using different backup methods, just in case.
2. reinstall the system as a 64-bit system, but also install the 32-bit compatibility libs along with the develoment versions of both 32-bit and 64-bit libraries I plan to use.
3. Restore my account, security, and home and development folders.
4. Test and verify that I have a complete and stable installation to support both 32-bit and 64-bit development.
As noted, you CANNOT combine the two: including 64-bit libs in a 32-bit project, or 32-bit libs in a 64-bit project will generally break the build. If you are careful, you can create a project that can create either 32-bit or 64-bit binaries depending upon what parameters you provide, but if you are not experienced in that (and clearly you are not) I would not suggest it until you spend a good deal of time researching the methods and examining existing FOSS projects that use the techniques.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.