[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | DIGITAL UNIX (FORMERLY KNOWN AS DEC OSF/1) |
Notice: | Welcome to the Digital UNIX Conference |
Moderator: | SMURF::DENHAM |
|
Created: | Thu Mar 16 1995 |
Last Modified: | Fri Jun 06 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 10068 |
Total number of notes: | 35879 |
9875.0. "problem with ld option in makefile" by MLNCSC::VOCI () Mon May 19 1997 12:13
Hello,
a customer is having problems passing a linker option -expect_unresolved
within an Imakefile.
Following you'll find the steps to reproduce the problem and the error
messages.
Is Imake supported on Digital Unix? Have you any example of ld options passed
within a makefile?
Thanks,
Gea
In this case the shared libraries aren't specified , but the option
-expect_unresolved is used.
This is the first Imakefile:
*************************************************************************
EXTRA_LOAD_FLAGS = -v "-expect_unresolved \"KEY*,BUS*,GEME*,COL*,MSG*\""
INCLUDES = -I$(PROJINCDIR)/GEME
CDEBUGFLAGS = -g
BASIC_COMM_LIBRARIES = $(GPSLIB) $(PICSLIB) $(TIMERLIB) $(TRACELIB) $(IMTLIB)
DEPBASIC_COMM_LIBRARIES = $(DEPGPSLIB) $(DEPPICSLIB) $(DEPTIMERLIB) \
$(DEPTRACELIB) $(DEPIMTLIB)
LOCAL_LIBRARIES = $(BASIC_COMM_LIBRARIES)
DEPLIBS = $(DEPBASIC_COMM_LIBRARIES)
SRCS = imt_ssdc_global.c main.c imt_ssdc_signal.c imt_ssdc_init.c \
imt_ssdc_send.c imt_ssdc_receive.c imt_ssdc_end.c imt_ssdc_gps.c
OBJS = $(SRCS:.c=.o)
ComplexProgramTarget(imt_ssdc)
*************************************************************************
1) projmkmf (is the script that has the following two command lines)
mv Makefile Makefile.bak
imake -I/INTEG/dist/ssci/imake_config -DUseInstalled -DTOPDIR=/INTEG/dist/ssci -DCURDIR=.
2) make clean
rm -f imt_ssdc
rm -f *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut *.Dat *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut "#"*
3) make all
cc -g -std0 -I/INTEG/dist/ssci/include/GEME -I/INTEG/dist/ssci/include -I/INTEG/dist/ssci/include -DLONG_BIT=64 -DNO_MESSAGE_CATALOG -c imt_ssdc_global.c
cc -g -std0 -I/INTEG/dist/ssci/include/GEME -I/INTEG/dist/ssci/include -I/INTEG/dist/ssci/include -DLONG_BIT=64 -DNO_MESSAGE_CATALOG -c main.c
cc -g -std0 -I/INTEG/dist/ssci/include/GEME -I/INTEG/dist/ssci/include -I/INTEG/dist/ssci/include -DLONG_BIT=64 -DNO_MESSAGE_CATALOG -c imt_ssdc_signal.c
cc -g -std0 -I/INTEG/dist/ssci/include/GEME -I/INTEG/dist/ssci/include -I/INTEG/dist/ssci/include -DLONG_BIT=64 -DNO_MESSAGE_CATALOG -c imt_ssdc_init.c
cc -g -std0 -I/INTEG/dist/ssci/include/GEME -I/INTEG/dist/ssci/include -I/INTEG/dist/ssci/include -DLONG_BIT=64 -DNO_MESSAGE_CATALOG -c imt_ssdc_send.c
cc -g -std0 -I/INTEG/dist/ssci/include/GEME -I/INTEG/dist/ssci/include -I/INTEG/dist/ssci/include -DLONG_BIT=64 -DNO_MESSAGE_CATALOG -c imt_ssdc_receive.c
cc -g -std0 -I/INTEG/dist/ssci/include/GEME -I/INTEG/dist/ssci/include -I/INTEG/dist/ssci/include -DLONG_BIT=64 -DNO_MESSAGE_CATALOG -c imt_ssdc_end.c
cc -g -std0 -I/INTEG/dist/ssci/include/GEME -I/INTEG/dist/ssci/include -I/INTEG/dist/ssci/include -DLONG_BIT=64 -DNO_MESSAGE_CATALOG -c imt_ssdc_gps.c
rm -f imt_ssdc
cc -o imt_ssdc -g -std0 -L/INTEG/dist/ssci/lib -L/INTEG/dist/ssci/lib/X11 -L/INTEG/dist/ssci/lib -L/INTEG/dist/ssci/lib/X11 imt_ssdc_global.o main.o imt_ssdc_signal.o imt_ssdc_init.o imt_ssdc_send.o imt_ssdc_receive.o imt_ssdc_end.o imt_ssdc_gps.o -
/usr/lib/cmplrs/cc/ld -o imt_ssdc -std0 -L/INTEG/dist/ssci/lib -L/INTEG/dist/ssci/lib/X11 -L/INTEG/dist/ssci/lib -L/INTEG/dist/ssci/lib/X11 -expect_unresolved "KEY*,BUS*,GEME*,COL*,MSG*" -g2 -O1 -call_shared /usr/lib/cmplrs/cc/crt0.o imt_ssdc_global.o mai
ld:
-expect_unresolved "KEY*,BUS*,GEME*,COL*,MSG*": Unknown flag
ld: Usage: ld [options] file [...]
0.0u 0.0s 0:00 20% 0+1k 0+0io 0pf+0w
*** Exit 1
Stop.
At this point using cut & paste I execute the link command .....
/usr/lib/cmplrs/cc/ld -o imt_ssdc -std0 -L/INTEG/dist/ssci/lib -L/INTEG/dist/ssci/lib/X11 -L/INTEG/dist/ssci/lib -L/INTEG/dist/ssci/lib/X11 -expect_unresolved "KEY*,BUS*,GEME*,COL*,MSG*" -g2 -O1 -call_shared /usr/lib/cmplrs/cc/crt0.o imt_ssdc_global.o mai
...... everything works fine.
If I copy on the disk, in the correct path, the two shared libraries I need
for the compilation and in the Imakefile I add the compiler directive
to link the two libraries (libgeme.so e liboldsim.so):
Here is The Imakefile for the second example:
****************************************************************************
INCLUDES = -I$(PROJINCDIR)/GEME
CDEBUGFLAGS = -g
BASIC_COMM_LIBRARIES = $(GPSLIB) $(PICSLIB) $(TIMERLIB) $(TRACELIB) $(IMTLIB) \
$(PROJLIBDIR)/libgeme.so $(PROJLIBDIR)/liboldsim.so
DEPBASIC_COMM_LIBRARIES = $(DEPGPSLIB) $(DEPPICSLIB) $(DEPTIMERLIB) \
$(DEPTRACELIB) $(DEPIMTLIB)
LOCAL_LIBRARIES = $(BASIC_COMM_LIBRARIES)
DEPLIBS = $(DEPBASIC_COMM_LIBRARIES)
SRCS = imt_ssdc_global.c main.c imt_ssdc_signal.c imt_ssdc_init.c \
imt_ssdc_send.c imt_ssdc_receive.c imt_ssdc_end.c imt_ssdc_gps.c
OBJS = $(SRCS:.c=.o)
ComplexProgramTarget(imt_ssdc)
***************************************************************************
1) make all
cc -g -std0 -I/INTEG/dist/ssci/include/GEME -I/INTEG/dist/ssci/include -I/INTEG/dist/ssci/include -DLONG_BIT=64 -DNO_MESSAGE_CATALOG -c imt_ssdc_global.c
cc -g -std0 -I/INTEG/dist/ssci/include/GEME -I/INTEG/dist/ssci/include -I/INTEG/dist/ssci/include -DLONG_BIT=64 -DNO_MESSAGE_CATALOG -c main.c
cc -g -std0 -I/INTEG/dist/ssci/include/GEME -I/INTEG/dist/ssci/include -I/INTEG/dist/ssci/include -DLONG_BIT=64 -DNO_MESSAGE_CATALOG -c imt_ssdc_signal.c
cc -g -std0 -I/INTEG/dist/ssci/include/GEME -I/INTEG/dist/ssci/include -I/INTEG/dist/ssci/include -DLONG_BIT=64 -DNO_MESSAGE_CATALOG -c imt_ssdc_init.c
cc -g -std0 -I/INTEG/dist/ssci/include/GEME -I/INTEG/dist/ssci/include -I/INTEG/dist/ssci/include -DLONG_BIT=64 -DNO_MESSAGE_CATALOG -c imt_ssdc_send.c
cc -g -std0 -I/INTEG/dist/ssci/include/GEME -I/INTEG/dist/ssci/include -I/INTEG/dist/ssci/include -DLONG_BIT=64 -DNO_MESSAGE_CATALOG -c imt_ssdc_receive.c
cc -g -std0 -I/INTEG/dist/ssci/include/GEME -I/INTEG/dist/ssci/include -I/INTEG/dist/ssci/include -DLONG_BIT=64 -DNO_MESSAGE_CATALOG -c imt_ssdc_end.c
cc -g -std0 -I/INTEG/dist/ssci/include/GEME -I/INTEG/dist/ssci/include -I/INTEG/dist/ssci/include -DLONG_BIT=64 -DNO_MESSAGE_CATALOG -c imt_ssdc_gps.c
rm -f imt_ssdc
cc -o imt_ssdc -g -std0 -L/INTEG/dist/ssci/lib -L/INTEG/dist/ssci/lib/X11 -L/INTEG/dist/ssci/lib -L/INTEG/dist/ssci/lib/X11 imt_ssdc_global.o main.o imt_ssdc_signal.o imt_ssdc_init.o imt_ssdc_send.o imt_ssdc_receive.o imt_ssdc_end.o imt_ssdc_gps.o -
I see non error message and the compilation works fine.
If I don't add in the Imakefile the linking of the two libraries, but add
the flag -expect_unresolved, I get:
Here is the Imakefile for the third example:
***************************************************************************
INCLUDES = -I$(PROJINCDIR)/GEME
CDEBUGFLAGS = -g
BASIC_COMM_LIBRARIES = $(GPSLIB) $(PICSLIB) $(TIMERLIB) $(TRACELIB) $(IMTLIB)
DEPBASIC_COMM_LIBRARIES = $(DEPGPSLIB) $(DEPPICSLIB) $(DEPTIMERLIB) \
$(DEPTRACELIB) $(DEPIMTLIB)
LOCAL_LIBRARIES = $(BASIC_COMM_LIBRARIES)
DEPLIBS = $(DEPBASIC_COMM_LIBRARIES)
SRCS = imt_ssdc_global.c main.c imt_ssdc_signal.c imt_ssdc_init.c \
imt_ssdc_send.c imt_ssdc_receive.c imt_ssdc_end.c imt_ssdc_gps.c
OBJS = $(SRCS:.c=.o)
ComplexProgramTarget(imt_ssdc)
***************************************************************************
1) make all
cc -g -std0 -I/INTEG/dist/ssci/include/GEME -I/INTEG/dist/ssci/include -I/INTEG/dist/ssci/include -DLONG_BIT=64 -DNO_MESSAGE_CATALOG -c imt_ssdc_global.c
cc -g -std0 -I/INTEG/dist/ssci/include/GEME -I/INTEG/dist/ssci/include -I/INTEG/dist/ssci/include -DLONG_BIT=64 -DNO_MESSAGE_CATALOG -c main.c
cc -g -std0 -I/INTEG/dist/ssci/include/GEME -I/INTEG/dist/ssci/include -I/INTEG/dist/ssci/include -DLONG_BIT=64 -DNO_MESSAGE_CATALOG -c imt_ssdc_signal.c
cc -g -std0 -I/INTEG/dist/ssci/include/GEME -I/INTEG/dist/ssci/include -I/INTEG/dist/ssci/include -DLONG_BIT=64 -DNO_MESSAGE_CATALOG -c imt_ssdc_init.c
cc -g -std0 -I/INTEG/dist/ssci/include/GEME -I/INTEG/dist/ssci/include -I/INTEG/dist/ssci/include -DLONG_BIT=64 -DNO_MESSAGE_CATALOG -c imt_ssdc_send.c
cc -g -std0 -I/INTEG/dist/ssci/include/GEME -I/INTEG/dist/ssci/include -I/INTEG/dist/ssci/include -DLONG_BIT=64 -DNO_MESSAGE_CATALOG -c imt_ssdc_receive.c
cc -g -std0 -I/INTEG/dist/ssci/include/GEME -I/INTEG/dist/ssci/include -I/INTEG/dist/ssci/include -DLONG_BIT=64 -DNO_MESSAGE_CATALOG -c imt_ssdc_end.c
cc -g -std0 -I/INTEG/dist/ssci/include/GEME -I/INTEG/dist/ssci/include -I/INTEG/dist/ssci/include -DLONG_BIT=64 -DNO_MESSAGE_CATALOG -c imt_ssdc_gps.c
rm -f imt_ssdc
cc -o imt_ssdc -g -std0 -L/INTEG/dist/ssci/lib -L/INTEG/dist/ssci/lib/X11 -L/INTEG/dist/ssci/lib -L/INTEG/dist/ssci/lib/X11 imt_ssdc_global.o main.o imt_ssdc_signal.o imt_ssdc_init.o imt_ssdc_send.o imt_ssdc_receive.o imt_ssdc_end.o imt_ssdc_gps.o -
ld:
Unresolved:
COL_IMT
MSG_VITA
KEY_VITA_NOME_TASK
GEME_INIZIALIZZAZIONE
BUS_init
GEMEMakeMsg
GEMEPutData
BUS_invio_messaggio
MSG_MSGIMT
KEY_MSGIMT_MITTENTE
KEY_MSGIMT_CODMSG
KEY_MSGIMT_TRIMTPARI
KEY_MSGIMT_TRIMTDISP
KEY_MSGIMT_CODSTAZ
KEY_MSGIMT_TIPOENTE
KEY_MSGIMT_IDENTE
KEY_MSGIMT_ITINE
KEY_MSGIMT_STATO
MSG_ORA
KEY_ORA_ORE
KEY_ORA_MINUTI
KEY_ORA_SECONDI
KEY_ORA_GIORNO
KEY_ORA_MESE
KEY_ORA_ANNO
BUS_stop
*** Exit 1
Stop.
T.R | Title | User | Personal Name | Date | Lines |
---|
9875.1 | | QUARRY::neth | Craig Neth | Mon May 19 1997 15:16 | 14 |
| I'm no expert on Make (or Imake) but I suspect that the problem is that
Make (or a shell it invokes for you) is eating your quotes.
Change this:
EXTRA_LOAD_FLAGS = -v "-expect_unresolved \"KEY*,BUS*,GEME*,COL*,MSG*\""
to:
EXTRA_LOAD_FLAGS = -v ""-expect_unresolved \"KEY*,BUS*,GEME*,COL*,MSG*\"""
And it works.
|
9875.2 | more infos | MLNCSC::VOCI | | Tue May 20 1997 11:56 | 12 |
| The customer ha modified the line to:
EXTRA_LOAD_FLAGS = -v ""-expect_unresolved \"KEY*,BUS*,GEME*,COL*,MSG*\"""
but he gets the error:
ld:
-expect_unresolved "KEY*,BUS*,GEME*,COL*,MSG*": Unknown flag
ld: Usage: ld [options] file [...]
Thanks,
Gea
|
9875.3 | | QUARRY::neth | Craig Neth | Tue May 20 1997 12:25 | 5 |
| I don't know what else to tell you - it works for me. You're sure
the customer redid the xmkmf, right?
Perhaps it has to do with what shell you use? I'm using csh.
|