LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 11-05-2022, 07:45 PM   #16
coltson
Member
 
Registered: Oct 2010
Posts: 149

Original Poster
Rep: Reputation: 3

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-programNo 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.
 
Old 11-06-2022, 02:00 AM   #17
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,855

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
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.
 
Old 11-06-2022, 09:31 AM   #18
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,635

Rep: Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697
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.
 
  


Reply

Tags
32bit, glibc



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
glibc-32bit-2.11.3-17.54.1 vs glibc-32bit-2.11.3-17.31.1 nsic SUSE / openSUSE 1 02-02-2014 12:47 PM
[SOLVED] centos5 both 32bit glibc and 64 glibc exist, how to delete the 32bit version zousheng Linux - Newbie 2 04-03-2013 09:17 AM
Fedora 13 32bit and then Linux Mint 32bit and then Ubuntu 10.04 32bit ciao303 Linux - Newbie 3 08-09-2010 11:03 PM
Trying to decide on a LCD monitor - 20", 20" wide, or 22" wide? etcetera General 5 07-28-2008 01:59 AM
RH 9.0 glibc rpm says it needs glibc-common, but glibc-common is installed whitshade Red Hat 2 04-28-2007 05:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration