pwuid error on ./l32/q

Cannot start process. ./l32/q prints ‘pwuid’ and exists. Has anyone experienced that kind of error?

Max

listed here

http://code.kx.com/wiki/Errors

maybe try ensuring the 32bit libs are installed

apt-get install ia32-libs

I think it is something else. All links are resolved

 ldd ./l32/q

linux-gate.so.1 =>  (0xf774d000)

libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf76ff000)

libnsl.so.1 => /lib/i386-linux-gnu/libnsl.so.1 (0xf76e5000)

libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf76df000)

libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf76c4000)

libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf751a000)

/lib/ld-linux.so.2 (0xf774e000)

ok, something’s misconfigured on your linux system in that it can’t determine the username.
here is similar code to help isolate the issue

$more a.c

#include<pwd.h>

#include<sys/types.h>

#include<stdio.h>

int main(int argc,char*argv){

  struct passwd*p=getpwuid(getuid());

  if(p)

    printf(“user:%s\n”,p->pw_name);

  else

    perror(“pwuid:”);

  return 0;

 }

$gcc a.c

$./a.out

Ubuntu 64bit. 

if compile with gcc -m32 it fails if with -m64 it returns username. 

g++ -m64 ./getpwuid.cpp 

/a.out max

Not found

~/q/getpwuid$ g++ -m64 ./getpwuid.cpp 

~/q/getpwuid$ ./a.out max

Name: Max ; UID: 10999

I think our IT configured desktop to use LDAP or some other mechanism to authenticate user.

cat /etc/nsswitch.conf

passwd:     files sss

shadow:     files sss

group:      files sss

Seems like ia32 stdc supports only /etc/passwd . 

ok, ask your sys admins to install the missing libraries so that 32bit apps can run correctly on your 64bit system.
if you run

strace q

it should reveal which library is missing

e.g.
open(“/lib/tls/i686/sse2/libnss_sss.so.2”, O_RDONLY) = -1 ENOENT (No such file or directory)

then identify which package that belongs to, and have sys admin install it.

thanks

Getting the same error.
Has this been resolved? Does installing 32 bit binaries help?

-Pratyush

I’ve found on ubuntu all i need to do is

sudo apt-get install gcc-multilib

WIll try this
Thanks

Took me sometime searching on the internet but finally got this working on Ubuntu by installing nscd - hope that helps someone