www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/02/27/05:18:25

Date: Sun, 27 Feb 2000 10:27:27 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Frank Donahoe <fdonahoe AT wilkes1 DOT wilkes DOT edu>
cc: DJGPP List <djgpp AT delorie DOT com>
Subject: Re: LD errors compiling source from gnupg-1.0.1.tar.gz
In-Reply-To: <Pine.A32.3.96.1000226114113.84774A-100000@wilkes1.wilkes.edu>
Message-ID: <Pine.SUN.3.91.1000227102701.14604Z-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: dj-admin AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sat, 26 Feb 2000, Frank Donahoe wrote:

> ../gnu/gnupg-1.0.1> sh configure i586-*-msdosdjgpp
> 
> went well and when it came to linking the assembler files from
> the target sub-subdirectory, copied them straight-a-way to the
> proper subdirectory.  While a DOS window under Windows 98 will
> preserve the case of file names, it counts `foo.S' and `foo.s'
> as the same file.  The rule for compiling the assembler files
> must be modified by changing the name of the intermediate file(s);
> 
> _mpih-mul1.o: mpih-mul1.S
> 	$(CPP) $(INCLUDES) $(DEFS) $< | grep -v '^#' > _mpih-mul1.s
> 	$(COMPILE) -c _mpih-mul1.s
> 
> or by substituting a different rule, causing the compiler to
> choose a intermediate temporary file name for the `.s' file

Sounds like something that should be reported to the maintainer, not
here (I don't even have the slightest idea what gnupg is).

> ar cru libmpi.a mpi-add.o mpi-bit.o mpi-cmp.o mpi-div.o mpi-gcd.o \
>   mpi-inline.o mpi-inv.o mpi-mul.o mpi-pow.o mpi-mpow.o mpi-scan.o \
>   mpicoder.o mpih-cmp.o mpih-div.o mpih-mul.o mpiutil.o g10m.o \
>   mpih-mul1.o mpih-mul2.o mpih-mul3.o mpih-add1.o mpih-sub1.o \
>   mpih-lshift.o mpih-rshift.o 
> ranlib libmpi.a
> 
> Seven files at the end of the above list of object files are from
> the assembler files.

Yes, but did they compile correctly?  You don't say that.

> :/djg/tmp/dj200000: line 1: syntax error near unexpected token `-Wl,-('
> c:/djg/tmp/dj200000: line 1: `gcc -g -O2 -mpentiumpro -march=pentiumpro -W
> -Wall -o mpicalc.exe  mpicalc.o ../cipher/libcipher.a ../mpi/libmpi.a
> ../util/libutil.a  -Wl,-( ../mpi/libmpi.a -)'

That's because parens are special to Bash, you need to escape them or
quote them.

> and the same long list of undefined references is also produced
> by...
> 
> gcc  -g -O2 -Wall  -o mpicalc.exe  mpicalc.o \
>    -Wl,--start-group ../cipher/libcipher.a ../mpi/libmpi.a \
>    ../util/libutil.a --end-group
[snip]
> The verbose option in the "tools" subdirectory prepends the following
> to the same list of unresolved references.
> 
> Reading specs from c:/djg/lib/gcc-lib/djgpp/2.952/specs
> gcc version 2.95.2 19991024 (release)
>  c:/djg/lib/gcc-lib/djgpp/2.952/collect2.exe -o mpicalc.exe \
>   c:/djg/lib/crt0.o -Lc:/djg/contrib/lib -Lc:/djg/lib \
>    -Lc:/djg/CONTRIB/lib -Lc:/djg/lib/gcc-lib/djgpp/2.952 \
>    -Lc:/djg/bin -Lc:/djg/lib mpicalc.o \
>    ../cipher/libcipher.a ../mpi/libmpi.a ../util/libutil.a \
>    --start-group ../mpi/libmpi.a -lgcc -lc -lgcc -Tdjgpp.djl

Why doesn't it show the invocation of ld.exe?  What version of
Binutils do you have installed, anyway?

Note that the above doesn't have the --end-group switch.  A typo?

> "nm" reveals the functions are in libmpi.a

Please post at least some of the output of `nm' which shows these
functions in the library.

One possible problem might be that the assembly module doesn't prepend
an underscore to the functions' names, while the code produced by
DJGPP from C sources requires the underscores.

If this doesn't help, there are linker switches which cause it to show
what modules does it load from what libraries, and which libraries
does it scan.  I suggest to use those switches to track what the
linker does.  It might give you some useful clues.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019