Solved

Problems with ld.so.1

Posted on 1998-08-07
12
251 Views
Last Modified: 2013-12-26
I´m working with the Lotus-Notes Api´s to C++. I compile with a "make" including the libraries for this API´s, and I try to run the program, pass this:"ld.so.1: ./conexion: fatal: libnotes.so: can't open file: errno=2 Killed". I had given all trust to the user, rwx, but the error going on.
0
Comment
Question by:jerussa
  • 5
  • 5
  • 2
12 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1295516
sounds that ther is no path to libnotes.so .
Depending on your OS put path to the lib in LD_LIBRARY_PATH (SHLIB_PATH on HP-UX) environment variable.

Probably you have ldd to check what paths a set in your executable, and which libs will be loaded at startup.
0
 
LVL 10

Expert Comment

by:rbr
ID: 1295517
Pls look at your LIBPATH and at the places where these paths points to. Look if you have this library.  
0
 
LVL 10

Accepted Solution

by:
rbr earned 350 total points
ID: 1295518
Pls give more info!
0
 

Author Comment

by:jerussa
ID: 1295519
I think the makefile isn´t the reason, anyway a put the file on:
TARGET=conexion
SUFFIXES: .pc .c .o
DEFINES = -DUNIX -DSOLARIS -DSOLSPARC
CPPAPI_ID = 0411
LIBNOTES = -L/usr/lotus/notescpp/lib/sol_2x -L/usr/lotus/notes/4610/sunspa
INCNOTES = -I/usr/lotus/notescpp/include
PROCPLSFLAGS= SQLCHECK=FULL CODE=CPP LINES=YES DBMS=V6
PROCINC=SYS_INCLUDE=/usr/include SYS_INCLUDE=/usr/ucbinclude SYS_INCLUDE=/opt/ars/api/include SYS_INCLUDE=/usr/local/include/g++
CC=g++
CPPFLAGS= -I/usr/include -I/usr/ar/api/include -I/usr/local/include/g++ -I/usr/lotus/GRI/ARS -I/usr/local/sparc-sun-solaris2.5.1/include \
      -I/usr/ucbinclude/sys -I/usr/lib/locale/C/LC_CTYPE $(INCNOTES)
LDFLAGS = -L/usr/ar/api/lib -L/usr/local/lib -L/usr/ucblib -L/usr/lib  $(LIBNOTES)
LDLIBS  = -lc -lar -lnotes -lthread -lm -lnsl -lnts -lsocket -ldl -lposix4 -lcppsun$(CPPAPI_ID)....

like  yo can see the libs abaout the notes API´s are in the makefile (-lnotes & -lcppsun$(CPPAPI_ID)
I think that is another problem

0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1295520
Try the -rpath and -rpath-link options for ld. For example in you makefile:

LDFLAGS = (all what is still there) -rpath $(LIBNOTES)
0
 

Author Comment

by:jerussa
ID: 1295521
I try to compile with the -rpath options and: "g++:-rpath unrecognized options"
I put on the makefile this:
"LDFLAGS = -L/usr/ar/api/lib -L/usr/local/lib -L/usr/ucblib -L/usr/lib  -rpath $(LIBNOTES)"
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 51

Expert Comment

by:ahoffmann
ID: 1295522
ahh, you're using g++ as linker ;-)
Use:

      LDFLAGS = ... -Wl,-rpath,$(LIBNOTES)

BTW, did ldd show you the right libnotes.so path?
0
 

Author Comment

by:jerussa
ID: 1295523
ld: fatal: file rpath: cannot open file; errno=2
ld: fatal: File processing errors.  No output written to conexion
*** Error code 1
make: Fatal error: Command failed for target `conexion'

This is the message that output, what a pity!, this in no so easy and I have to increase the points to ...
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1295524
could you please add
  -v -Wl,-v

to CPPFLAGS and then post the output.

BTW, still waiting for ldd result.
0
 

Author Comment

by:jerussa
ID: 1295525
The output is very long, I can  send you  via e-mail, anyway I put the follow lines like you say me:
CPPFLAGS= -v -Wl,-v -I/usr/include -I/usr/ar/api/include -I/usr/local/include/g++
     -I/usr/lotus/GRI/ARS -I/usr/local/sparc-sun-solaris2.5.1/include \
     -I/usr/ucbinclude/sys -I/usr/lib/locale/C/LC_CTYPE $(INCNOTES)

It´s rigth, say me to email and i send the output file.
0
 

Author Comment

by:jerussa
ID: 1295526
Anyway this is a piece of output:
"#include "..." search starts here:
#include <...> search starts here:
 /usr/include
 /usr/ar/api/include
 /usr/local/include/g++
 /usr/lotus/GRI/ARS
 /usr/ucbinclude/sys
 /usr/lib/locale/C/LC_CTYPE
 /usr/lotus/notescpp/include
 /usr/local/include/g++
 /usr/local/include
 /usr/local/sparc-sun-solaris2.6/include
 /usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.8.1/include
 /usr/include
End of search list.
 /usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.8.1/cc1plus /var/tmp/cca0008w.ii -quiet -dumpbase conexion.cc -version -o /var/tmp/cca0008w.s
GNU C++ version 2.8.1 (sparc-sun-solaris2.6) compiled by GNU C version 2.8.1.
 /usr/ccs/bin/as -V -Qy -s -o conexion.o /var/tmp/cca0008w.s
/usr/ccs/bin/as: SC4.2 dev 30 Nov 1995
g++: -v: linker input file unused since linking not done
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.8.1/specs
gcc version 2.8.1
 /usr/ccs/bin/ld -V -Y P,/usr/ccs/lib:/usr/lib -Qy -o conexion /usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.8.1/crt1.o /usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.8.1/crti.o /usr/ccs/lib/values-Xa.o /usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.8.1/crtbegin.o -L/usr/ar/api/lib -L/usr/local/lib -L/usr/ucblib -L/usr/lib -L/usr/lotus/notes/4610/sunspa -L/usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.8.1 -L/usr/local/sparc-sun-solaris2.6/lib -L/usr/ccs/bin -L/usr/ccs/lib -L/usr/local/lib interface.o ARSIIL.o ARSFVL.o entryid.o ARS_Utiles.o Lfichero.o Nt_api.o Socket.o conexion.o rpath -L/usr/lotus/notescpp/lib/sol_2x -lar -lnotes -lthread -lnsl -lnts -lsocket -ldl -lposix4 -lcppsun0411 -v -lstdc++ -lm -lc -lgcc -lc -lgcc /usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.8.1/crtend.o /usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.8.1/crtn.o
ld: Software Generation Utilities (SGU) SunOS/ELF (LK-2.0 (S/I) - versioning)
/usr/ccs/bin/ld: illegal option -- v
usage: ld [-abd:e:f:h:il:mo:rstu:z:B:D:F:GI:L:M:Q:R:S:VY:] file(s)
        [-a]            create an absolute file
        [-b]            do not do special PIC relocations in a.out
        [-d y|n]        operate in dynamic|static mode
        [-e sym]        use `sym' as entry point address
        [-f name]       specify library for which this file is an auxiliary
                        filter
        [-h name]       use `name' as internal shared object identifier
        [-i]            ignore LD_LIBRARY_PATH setting
        [-l x]          search for libx.so or libx.a
        [-m]            print memory map
        [-o outfile]    name the output file `outfile'
        [-r]            create a relocatable object
        [-s]            strip any symbol and debugging information
        [-t]            do not warn of multiply defined symbols of
                        different sizes
        [-u sym]        create an undefined symbol `sym'
        [-z defs|nodefs]                        disallow|allow undefined symbols
        [-z muldefs]    allow multiply defined symbols
        [-z noversion]  don't record any version sections
        [-z text]       disallow output relocations against text
        [-B local]      reduce unqualified global symbols to local
        [-B dynamic|static]
                        search for shared libraries|archives
       [-B reduce]     process symbol reductions
        [-B symbolic]   bind external references to definitions when
                        creating shared objects
        [-D options]    print diagnostic messages
        [-F name]       specify library for which this file is a filter
        [-G]            create a shared object
        [-I interp]     use `interp' as path name of interpreter
        [-L path]       search for libraries in directory `path'
        [-M mapfile]    use processing directives contained in `mapfile'
        [-Q y|n]        do|do not place version information in output file
        [-R path]       specify a library search path to be used at run time
        [-S name]       specify a link-edit support library
        [-V]            print version information
        [-Y P,dirlist]  use `dirlist' as a default path when searching
                        for libraries
make: Fatal error: Command failed for target `conexion'/usr/local/include/g++: cannot execute"


0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1295527
Oops, didn't know that Solaris' ld has no more -v option.

-Wl,-v  is useless (produces the error), sorry.

hoagascht@gmx.net
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now