General
cancel
Showing results for 
Search instead for 
Did you mean: 

/usr/lib/dld.sl: Call to mmap() failed

Richard Aubain
Occasional Visitor

/usr/lib/dld.sl: Call to mmap() failed


--------------------------------------------
--------------------------------------------
/usr/lib/dld.sl: Call to mmap() failed - TEXT /opt/sybase/04/OCS-12_5/lib/libblk.sl
/usr/lib/dld.sl: Permission denied
--------------------------------------------
--------------------------------------------


(sys19:aubainr:>) env|grep SYBASE
SYBASE=/opt/sybase/04
SYBASE_DSPROC=dataserver1s25
SYBASE_ASE=ASE-12_5
SYBASE_OCS=OCS-12_5

(sys19:aubainr:>) cd *X/creconv/opt

(sys19:aubainr:>) rm *.o

(sys19:aubainr:>) make -f *mak_opt
aCC +DA2.0N -D_RWCONFIG=8s -c -Aa -O -I../ -I/opt/rw_buildspace_1251/include -I/opt/rw_build
space_1251/rw/db -I/opt/rw_buildspace_1251/source/sybasect -I/opt/rw_buildspace_1251 -I/opt/sybase/0
4/OCS-12_5/include -I../../lib -I../../shared -I../../dbinserter -I../../dbconnection -D_RWBUILD_db
t +w +W229 +W361 +W392 +W431 +W655 +W684 +W818 +W819 +W849 +W889 -AA +ESnolit -O ../creconv.c
aCC +DA2.0N -o creconv creconv.o /opt/rw_buildspace_1251/lib/rwctl8s.o ../../shared/opt/shar
ed.a ../../lib/opt/pflib.a ../../dbconnection/opt/DBConnection.a ../../dbinserter/opt/DBInserter.a -
L/opt/rw_buildspace_1251/lib -lctl8s -ldbt8s -lnetwork8s -ltls8s -lstd8s -L/opt/sybase/04/OCS-12_5/
lib -lblk -lct -lcs -lcomn -ltcl -lintl -lcl /usr/lib/libCsup.a /usr/lib/libf.a /usr/lib/libstream.a
-lm -lc +w +W229 +W361 +W392 +W431 +W655 +W684 +W818 +W819 +W849 +W889 -Wl,+vnocompatwarnings -AA +
ESnolit -O -Wl,+s +nostl
(sys19:aubainr:>)

(sys19:aubainr:>) creconv
/usr/lib/dld.sl: Call to mmap() failed - TEXT /opt/sybase/04/OCS-12_5/lib/libblk.sl
/usr/lib/dld.sl: Permission denied
Abort(coredump)


(sys19:aubainr:>) ll /opt/sybase/04/OCS-12_5/lib/libblk.sl
-rw-r--r-- 1 sybase sybase 180224 Aug 17 2006 /opt/sybase/04/OCS-12_5/lib/libblk.sl


(sys19:aubainr:>) ll /opt/sybase/04/OCS-12_5/
total 22
drwxr-xr-x 2 sybase sybase 1024 Oct 30 2006 bin
drwxr-xr-x 2 sybase sybase 1024 Oct 31 2006 config
drwxr-xr-x 2 sybase sybase 3072 Oct 31 2006 devlib
drwxr-xr-x 2 sybase sybase 1024 Oct 30 2006 include
drwxr-xr-x 2 sybase sybase 3072 Oct 31 2006 lib
drwxr-xr-x 2 sybase sybase 1024 Oct 30 2006 lib3p
drwxr-xr-x 2 sybase sybase 1024 Oct 30 2006 lib3p64
drwxr-xr-x 7 sybase sybase 96 Oct 30 2006 sample
drwxr-xr-x 3 sybase sybase 96 Oct 30 2006 sybhelp
drwxr-xr-x 2 sybase sybase 96 Oct 30 2006 xappdefaults
(sys19:aubainr:>)
6 REPLIES
TTr
Honored Contributor

Re: /usr/lib/dld.sl: Call to mmap() failed

What about your SHLIB_PATH? It should contain the /opt/sybase/OCS-12_5/lib in it in addition to the existing settings. Also there may be other library paths under /opt/sybase that may need to be added in the SHLIB_PATH.
Don Morris_1
Honored Contributor

Re: /usr/lib/dld.sl: Call to mmap() failed

Well, you don't give a version for HP-UX.

Assuming not v3, from mmap(2):
The mmap() function will fail if:

EACCES

The fildes argument is not open for read, regardless of the protection specified, or fildes is not open for write and PROT_WRITE was specified for a MAP_SHARED type mapping, or PROT_EXECUTE was set for a MAP_SHARED mapping operation and the underlying file does not have execute permission.

Note that your library is -rw-r--r-- so you need to chmod +x at the least (or other options if you want just group or all users, etc.) Shared libraries are, unsurprisingly mapped with MAP_SHARED, by the way.

11i v3 has corrected this to conform with UNIX 2003 (see http://docs.hp.com/en/5991-6469/ch09s16.html ).
Richard Aubain
Occasional Visitor

Re: /usr/lib/dld.sl: Call to mmap() failed

Our System is:
HP-UX sys19 B.11.11 U 9000/800 136901597 unlimited-user license

The SYBASE env. is also set in PATH and SHLIB_PATH

When reverting back to our previous sybase setup environment (32 bit) the same RWX settings are used and works although the extension is different.

Does the .sl file need chmod "x" wheras the .a file does not?

ll /opt/sybase/05/OCS-12_5/lib/*blk*
-rw-r--r-- 1 sybase sybase 204120 Jan 13 2004 /opt/sybase/05/OCS-12_5/lib/libblk.a
-rw-r--r-- 1 sybase sybase 216446 Jan 14 2004 /opt/sybase/05/OCS-12_5/lib/libblk_r.a
Mounaam
Trusted Contributor

Re: /usr/lib/dld.sl: Call to mmap() failed

I confirm you that .sl have to be executable.

.a don't need to be executable because code and data that are needed are copied into the executable during the link edition.
Richard Aubain
Occasional Visitor

Re: /usr/lib/dld.sl: Call to mmap() failed

Many thanks to all..
TTr
Honored Contributor

Re: /usr/lib/dld.sl: Call to mmap() failed

First some of the basics.

> The SYBASE env. is also set in PATH and SHLIB_PATH

What is "echo $SHLIB_PATH"?

Mounaam is correct, the ".a" does not need to be executable, only readable; ".sl" needs to be executable. In your case ".sl" does not exist.

Also in your listings you show two environments, /opt/sybase/04 and /opt/sybase/05 (note the 04 and 05). Is that a typo or you have two servers or two installations in the same server?

Now there is bug note in http://download.sybase.com/pdfdocs/dcsr1107e/dcmssrb2.pdf

bottom of pages 9 and 12. I am not sure it applies to you but it clearly says at one point sybase changed from using the .a library to using the .sl library.

So if you have an early release of sybase, you need the .sl library. This means that the "make" will create it at some point (which means your environment settings are wrong) or you have to find it from sybase.

If you have a later release of sybase which does not need the .sl library. This does not agree with the error.