Strange missing library error with gcc -g

Strange missing library error with gcc -g

Post by David Bo » Thu, 31 Mar 1994 15:52:34



Well, I'm back.  First thanks to all the people who pointed me to the
atdisk patch for hooking up drives to my secondary controller port.

Now for the latest.  I was compiling this program I am working on
with debugs (i.e. CDEBUGFLAGS=-g passed to make) and keep getting this
weired error back from the link step that says one of my libraries
is missing.  The following is the command line and error:

gcc -o mumail MmActions.o MmBodyBox.o MmDigest.o MmDraft.o MmEdit.o MmFolder.o MmHelp.o MmLetter.o MmMailProcs.o MmMain.o MmMenu.o MmMisc.o             MmQuickKeys.o MmScreen.o MmText.o MmToc.o MuGeneric.o MuWin.o           MuAlert.o MuChooser.o           strftime.o  -g -m486 -DNO_ASM -fwritable-strings -LFWF/lib -L/usr/X386/lib  -lfwf -lXpm  -lXaw -lXmu -lXt -lXext -lX11  
ld: No such file or directory for libXpm

The weird thing is I don't get this error if I run without the -g. The
following command line works:

gcc -o mumail MmActions.o MmBodyBox.o MmDigest.o MmDraft.o MmEdit.o MmFolder.o MmHelp.o MmLetter.o MmMailProcs.o MmMain.o MmMenu.o MmMisc.o             MmQuickKeys.o MmScreen.o MmText.o MmToc.o MuGeneric.o MuWin.o           MuAlert.o MuChooser.o           strftime.o  -O2 -m486 -DNO_ASM -fwritable-strings -LFWF/lib -L/usr/X386/lib  -lfwf -lXpm  -lXaw -lXmu -lXt -lXext -lX11  

I have checked the permissions on the library (both the .so and the .sa),
and rerun ldconfig.

The following is the output of gcc -v and a dump of the specs:

Reading specs from /usr/lib/gcc-lib/i486-linux/2.5.8/specs
gcc version 2.5.8

*asm:

*asm_final:

*cpp:
%{!m386:-D__i486__} %{posix:-D_POSIX_SOURCE}

*cc1:

*cc1plus:

*endfile:

*link:
%{v:-dll-verbose} %{!m386:-m486}

*lib:
%{mieee-fp:-lieee} %{p:-lgmon -lc_p} %{pg:-lgmon -lc_p} %{!p:%{!pg:%{!g*:-lc} %{g*:-lg}}}

*startfile:
%{pg:gcrt0.o%s -static} %{!pg:%{p:gcrt0.o%s -static} %{!p:crt0.o%s %{g*:-static}%{!static:%{nojump:-nojump}} %{static:-static}}}

*switches_need_spaces:

*signed_char:
%{funsigned-char:-D__CHAR_UNSIGNED__}

*predefines:
-Dunix -Di386 -Dlinux -Asystem(unix) -Asystem(posix) -Acpu(i386) -Amachine(i386)

*cross_compile:
0

If anyone has an idea what is causing this annoyance I would appreciate
it.  If it helps I am running Slackware 1.2.0 (great distribution) with
a 1.0.4 kernel.  thanks
--
David W. Boyd                UUCP:     uunet!sparky!dwb

1404 Ft. Crook Rd. South     Phone:    (402) 291-8300
Bellevue, NE. 68005-2969     FAX:      (402) 291-4362
Reston Va Phone: (703)264-8008