Common Dosbox Error


Pickle

Mega GP Mania
Joined
May 30, 2006
Messages
5,518
Location
Detroit, Michigan
Website
Visit site
: error while loading shared libraries: cannot create search path array: Cannot
allocate memory

Anyone have any idea where this error is coming from? Ive compilied dosbox as static so why should it be trying to find shared libraries?
Ive compilied 2 versions, one has worked, made some minors changes, then problem comes up again.

Im going to spend more time analyzing the issue, but im starting the thread to kick off getting any ideas from anyone.
 
If you are trying this on Pandora, then I think you won't get many answers (unless you did not look for obvious standard ones by using Google).

If this is not for Pandora, you message isn't posted where it should :)
 
I may be well wide of the mark here, but those errors look like they're something to do with glibc...

Maybe related to this warning?

CODE

dos_programs.cpp:(.text+0xde8): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
 
Laurent said:
If you are trying this on Pandora, then I think you won't get many answers (unless you did not look for obvious standard ones by using Google).

If this is not for Pandora, you message isn't posted where it should :)

ah crud! Maybe a mod can move it to GP2X. I wish I was trying to run this on pandora.
fishybawb said:
I may be well wide of the mark here, but those errors look like they're something to do with glibc...

Maybe related to this warning?

CODE

dos_programs.cpp:(.text+0xde8): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking

hmm, thats something to start with. I think I saw your thread with this you used gdb to find it right.
 
Last edited by a moderator:
Update:
Ive found this The getpwnam() function searches the user database for an entry with a matching name.
I dont find this function anywhere in the dosbox code. Maybe glib itself is using it? I dont see where in dos_programs.cpp this is popping up.

ok what the heck:
getpwnam, getpwuid - get password file entry
why does anything need to look at the passwd file? this is very strange to me.
 
ok found this on a ps2 forum

phosphorous wrote: dos/libdos.a(dos_programs.o): In function `ResolveHomedir(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
dos_programs.cpp:(.text+0xcfc): undefined reference to `getpwnam' HAVE_PWD_H should be undefined in config.h

Tried and it gets rid of this:

dos/libdos.a(dos_programs.o): In function `ResolveHomedir(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
dos_programs.cpp:(.text+0xde8): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking

Anyone brave enough to try this in the next hour send me a pm with and email address. I cant test it at the moment and im dying to know if it works.
 
Here the problem spot so it seems in dos_programs.cpp:

CODE

#if defined HAVE_SYS_TYPES_H && defined HAVE_PWD_H
#include <sys/types.h>
#include <pwd.h>
#endif


.
.
.
CODE

#if defined HAVE_SYS_TYPES_H && defined HAVE_PWD_H
} else { // The ~username variant
std::string::size_type namelen = temp_line.find(CROSS_FILESPLIT);
if(namelen == std::string::npos) namelen = temp_line.size();
std::string username = temp_line.substr(1,namelen - 1);
struct passwd* pass = getpwnam(username.c_str());
if(pass) temp_line.replace(0,namelen,pass->pw_dir); //namelen -1 +1(for the ~)
#endif // USERNAME lookup code
 
Well anyone following this, the problem above isnt the problem.
Which makes since because the 0.70 build have the same problem. Back to square one.
 
Back
Top