libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Shared library with U suffix not installed


From: Lawrence, David (STEI)
Subject: RE: Shared library with U suffix not installed
Date: Fri, 25 May 2001 15:53:41 -0700

Robert,

Thank you for your offer of assistance.  Please note, I don't believe this
is a tool problem, just a problem with me correctly defining the
Makefile.am(s) to produce the output I need.

The directory structure is as follows:

build
    src
        include
        comutil
            include
        dmiapi
        dmiutil
        dmionc
        psl
        wrap2
        oncsp

There is a Makefile.am in each directory.  comutil is the static library.
dmiapi, dmiutil, dmionc and wrap2 each make shared libraries.  The shared
libraries created by dmionc and wrap2 depend on the one or both of the other
shared libraries.

psl and oncsp both crate daemons.  It is the make for oncsp that aborts on
an error.  The undefined reference is to a function in the static library
comutil.

Here is the output of the build log at the point of failure:

Making all in src
make[1]: Entering directory
`/home/davel/dev/EmergingProducts/LinuxDMISP_base/build/src'
Making all in comutil
make[2]: Entering directory
`/home/davel/dev/EmergingProducts/LinuxDMISP_base/build/src/comutil'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory
`/home/davel/dev/EmergingProducts/LinuxDMISP_base/build/src/comutil'
Making all in dmiapi
make[2]: Entering directory
`/home/davel/dev/EmergingProducts/LinuxDMISP_base/build/src/dmiapi'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory
`/home/davel/dev/EmergingProducts/LinuxDMISP_base/build/src/dmiapi'
Making all in dmiutil
make[2]: Entering directory
`/home/davel/dev/EmergingProducts/LinuxDMISP_base/build/src/dmiutil'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory
`/home/davel/dev/EmergingProducts/LinuxDMISP_base/build/src/dmiutil'
Making all in dmionc
make[2]: Entering directory
`/home/davel/dev/EmergingProducts/LinuxDMISP_base/build/src/dmionc'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory
`/home/davel/dev/EmergingProducts/LinuxDMISP_base/build/src/dmionc'
Making all in psl
make[2]: Entering directory
`/home/davel/dev/EmergingProducts/LinuxDMISP_base/build/src/psl'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory
`/home/davel/dev/EmergingProducts/LinuxDMISP_base/build/src/psl'
Making all in wrap2
make[2]: Entering directory
`/home/davel/dev/EmergingProducts/LinuxDMISP_base/build/src/wrap2'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory
`/home/davel/dev/EmergingProducts/LinuxDMISP_base/build/src/wrap2'
Making all in oncsp
make[2]: Entering directory
`/home/davel/dev/EmergingProducts/LinuxDMISP_base/build/src/oncsp'
/bin/sh ../../libtool --mode=link gcc  -D_REENTRANT -D_GNU_SOURCE -Wall
-DUNIX -DLINUX -DUSE_UXPRAGMA -fpic -DSHARED_MEM  -o oncsp  client_c.o
daemon.o oncsp.o oncutil.o server_s.o server_x.o ../comutil/libcomutil.la
../dmiapi/libdmiapi.la ../wrap2/libdmi2api.la ../dmiutil/libdmiutil.la
-lpthread -lnsl -ldl 
gcc -D_REENTRANT -D_GNU_SOURCE -Wall -DUNIX -DLINUX -DUSE_UXPRAGMA -fpic
-DSHARED_MEM -o .libs/oncsp client_c.o daemon.o oncsp.o oncutil.o server_s.o
server_x.o  ../comutil/.libs/libcomutil.a ../dmiapi/.libs/libdmiapi.so
../wrap2/.libs/libdmi2api.so
/home/davel/dev/EmergingProducts/LinuxDMISP_base/build/src/dmiutil/.libs/lib
dmiutil.so
/home/davel/dev/EmergingProducts/LinuxDMISP_base/build/src/dmiapi/.libs/libd
miapi.so ../dmiutil/.libs/libdmiutil.so -lpthread -lnsl -ldl -Wl,--rpath
-Wl,/usr/local/lib/dmi
../dmiapi/.libs/libdmiapi.so: undefined reference to `RmiInvoke'
collect2: ld returned 1 exit status
make[2]: *** [oncsp] Error 1
make[2]: Leaving directory
`/home/davel/dev/EmergingProducts/LinuxDMISP_base/build/src/oncsp'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/home/davel/dev/EmergingProducts/LinuxDMISP_base/build/src'
make: *** [all-recursive] Error 1

my makefile.am files follow (listed in alphabetic order - see the src
Makefile.am for build order):

Thanks again,

David Lawrence
address@hidden

comutil-Makefile.am

noinst_LTLIBRARIES = libcomutil.la
libcomutil_la_SOURCES = context.c dmistr.c dmitime.c dmitormi.c \
 filepath.c filexist.c lang3d.c list.c logf.c ltrim.c qstrtok.c \
 readline.c scandir.c scanline.c str3d.c strrdelm.c trim.c unistr.c \
 ux_files.c uxclnup.c uxsem.c uxshm.c uxstr.c uxsync.c uxtbl.c 
INCLUDES = -I$(srcdir)/../include -I$(srcdir)/include
CFLAGS = -D_REENTRANT -D_GNU_SOURCE -Wall -DUNIX -DLINUX -DUSE_UXPRAGMA
-fPIC
LDFLAGS = -static
EXTRA_DIST = include


dmiapi - Makefile.am

pkglib_LTLIBRARIES = libdmiapi.la
libdmiapi_la_SOURCES = dll_ux.c dllalloc.c dlldata.c dllentry.c dllindct.c \
 dllinvk.c dllshmem.c dllthrd.c dllutil.c dllconst.h dllextrn.h dllproto.h \
 dlltypdf.h ntsldll.h resource.h
libdmiapi_la_LIBADD = ../comutil/libcomutil.la
INCLUDES = -I$(srcdir)/../include -I$(srcdir)/../psl
-I$(srcdir)/../comutil/include
CFLAGS = -D_REENTRANT -D_GNU_SOURCE -Wall -DUNIX -DLINUX -DUSE_UXPRAGMA
-fPIC -DSHARED_MEM


dmionc - Makefile.am

pkglib_LTLIBRARIES = libdmionc.la
libdmionc_la_SOURCES = client_svc.c client_xdr.c onccli.c oncsrv.c oncutil.c
\
 regbhand.c server_clnt.c server_xdr.c \
 client.h common.h dmionc.h onccli.h oncutil.h regbhand.h server.h
libdmionc_la_LIBADD = ../dmiutil/libdmiutil.la
INCLUDES = -I$(srcdir)/../include 
CFLAGS = -D_REENTRANT -D_GNU_SOURCE -Wall -DUNIX -DLINUX -DUSE_UXPRAGMA
-fPIC -DSHARED_MEM


dmiutil - Makefile.am

pkglib_LTLIBRARIES = libdmiutil.la
libdmiutil_la_SOURCES = dmimem.c dminew.c dmipool.c \
 dmiutl.h
libdmiutil_la_LIBADD = ../comutil/libcomutil.la
INCLUDES = -I$(srcdir)/../include -I$(srcdir)/../comutil/include
CFLAGS = -D_REENTRANT -D_GNU_SOURCE -Wall -DUNIX -DLINUX -DUSE_UXPRAGMA
-fPIC -DSHARED_MEM
sbin_PROGRAMS = oncsp
oncsp_SOURCES = client_c.c daemon.c oncsp.c oncutil.c server_s.c server_x.c
\
 client.h common.h daemon.h dbgutil.h oncutil.h os_rpc.h server.h
INCLUDES = -I$(srcdir)/../include -I$(srcdir)/../comutil/include
-I/usr/include \
 -I/usr/include/rpc
CFLAGS = -D_REENTRANT -D_GNU_SOURCE -Wall -DUNIX -DLINUX -DUSE_UXPRAGMA
-fpic -DSHARED_MEM
oncsp_LDADD = ../comutil/libcomutil.la ../dmiapi/libdmiapi.la
../wrap2/libdmi2api.la ../dmiutil/libdmiutil.la


project - Makefile.am

SUBDIRS = src
EXTRA_DIST = config


psl - Makefile.am

sbin_PROGRAMS = dmispd
dmispd_SOURCES = bif.c biftodmi.c clntinfo.c cmdtrace.c daemon.c \
 db_aloc.c db_api.c db_attr.c db_comp.c db_cpath.c db_data.c db_enum.c \
 db_group.c db_hdr.c db_index.c db_key.c db_strng.c db_table.c dumpcmd.c \
 install.c mif_aloc.c mif_cach.c mif_hdr.c mif_io.c nt_shmem.c nterror.c \
 os_glob.c pr_attr.c pr_bif.c pr_class.c pr_comp.c pr_enum.c pr_err.c \
 pr_group.c pr_key.c pr_keytb.c pr_lex.c pr_parse.c pr_path.c pr_plib.c \
 pr_src.c pr_table.c pr_tok.c psldb.c pslmain.c pslsrvc.c shrink.c \
 sl_dh.c sl_mh.c sl_om.c sl_tm.c sl_utilc.c ux_os.c uxclntth.c \
 uxslmain.c uxslutil.c \
 bif.h biftodmi.h clntinfo.h cmdtrace.h daemon.h db_aloc.h db_api.h \
 db_hdr.h db_index.h db_int.h dbgutil.h dmi2_sl.h flat32.h mif_aloc.h \
 mif_cach.h mif_defs.h mif_hdr.h mif_io.h nt_shmem.h nterror.h \
 ntevents.h ntmsg.h ntsl.h os_glob.h os_poff.h os_pon.h os_sl.h os_svc.h \
 pr_attr.h pr_bif.h pr_class.h pr_comp.h pr_enum.h pr_err.h pr_group.h \
 pr_key.h pr_lex.h pr_main.h pr_parse.h pr_path.h pr_plib.h pr_src.h \
 pr_table.h pr_tok.h psldb.h psldmi.h pslmain.h pslsrvc.h psluni.h \
 sl_dh.h sl_mh.h sl_om.h sl_tm.h sl_utilc.h sl_ver.h traceapi.h \
 ux_proto.h uxclntth.h uxsl.h uxslutil.h 
INCLUDES = -I$(srcdir)/../include -I$(srcdir)/../comutil/include
LDADD = ../comutil/libcomutil.la 
CFLAGS = -D_REENTRANT -D_GNU_SOURCE -Wall -DUNIX -DLINUX -DUSE_UXPRAGMA
-fpic -DSHARED_MEM


src - Makefile.am

SUBDIRS = comutil dmiapi dmiutil dmionc psl wrap2 oncsp
EXTRA_DIST = include


wrap2 - Makefile.am

pkglib_LTLIBRARIES = libdmi2api.la
libdmi2api_la_SOURCES = adv1fv2.c adv2fv1.c bv1.c ci2sl.c comv1fv2.c
comv2fv1.c filter.c \
 indfwd.c indqueue.c indv1fv2.c indv2fv1.c lang.c reginfo.c rpclist.c
session.c shim.c \
 shimutil.c sl.c sl2ci.c subscrpt.c uxdmi2api.c uxmain.c \
 ci2_pr.h errors.h ind.h indqueue.h indtable.h rpclist.h session.h shim.h
shimutil.h \
 sl.h uxmain.h
libdmi2api_la_LIBADD = ../comutil/libcomutil.la ../dmiutil/libdmiutil.la
../dmiapi/libdmiapi.la
INCLUDES = -I$(srcdir)/../include -I$(srcdir)/../comutil/include
CFLAGS = -D_REENTRANT -D_GNU_SOURCE -Wall -DUNIX -DLINUX -DUSE_UXPRAGMA
-fPIC -DSHARED_MEM





-----Original Message-----
From: Robert Boehne [mailto:address@hidden
Sent: Friday, May 25, 2001 2:37 PM
To: Lawrence, David (STEI)
Cc: 'address@hidden'
Subject: Re: Shared library with U suffix not installed


"Lawrence, David (STEI)" wrote:
> 
> I am new to the Autotools and so may have overlooked the obvious, but I
> would appreciate any help/guidance you might be able to provide.  I have
> reviewed the Autoconf, Automake and Libtool manuals and read the New
Riders
> "Gnu Autoconf, Automake and Libtool" book.
> 
> I am using Autoconf 2.13 and Automake 1.4 on Red Hat 7.0 with the glibc
> fixes.  I upgraded to Libtool 1.4 from one of the Gnu mirrors based on
> messages I read in the archives for this mailing list.
> 
> I am porting an existing project and its directory structure to the
> Autotools.
> 
> The project being ported creates daemons that have a programming interface
> accessed through shared libraries.  Other developers will be accessing the
> daemons through these shared libraries, so they need to be able to link
the
> shared libraries and use the project's global header files to do so.
> 
> In addition, there is a static library used to provide helper functions to
> the shared libraries and daemons that is not intended to be accessed by
> others.
> 
> The project directory structure is similar to the following with my
> understanding of where convention would have the output installed:
> 
> project
>      staticlib  (for building daemonx and sharedlibx ... not to be
> installed)
>           include    (for building daemonx and sharedlibx ... not to be
> installed)
>      daemon1    installed in $(sbindir)
>      sharelib1  installed in $(pkglibdir)
>      sharelib2  installed in $(pkglibdir)
>      sharelib3  installed in $(pkglibdir)
>      include    installed in $(pkgincludedir)
>      subdir
>           sharelib4  installed in $(pkglibdir)
>           daemon2  installed in $(sbindir)
> 
> Two of the sharedlibs are dependent on other shared libs.  (All of the
> shared libs and the daemons use the staticlib).
> 
> What is the correct way to instruct the Autotools to make a shared library
> that references another shared library?  For example, in the directory
> structure above sharelib3 needs to reference sharelib1.  I have tried
> various combinations in LDADD and LIBADD ... trying to follow error
messages
> from Automake ... without success.  I have also tried an LDFLAGS option
> (-l../sharedlib/libsharelib1.la), but that creates an LD error that it
can't
> find the library.  The shared libraries have not been installed on the
> system.  I'm trying to get a succesful build first.
> 
> Suggestions?
> 

David:

It's a bit hard to debug without the exact shell commands and their
errors.
For the static library, you'll want to use a Libtool convience library,
for the others a normal Libtool library.  Post the exact commands and
errors that you get and perhaps we can help.

Cheers!

Robert

-- 
Robert Boehne             Software Engineer
Ricardo Software   Chicago Technical Center
TEL: (630)789-0003 x. 238
FAX: (630)789-0127
email:  address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]