🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.eiffel
Article #1578

Bug Report: math library link order.

#1578
From: Paul Johnson
Date: Fri, 16 Feb 1990 15:48
42 lines
1911 bytes
SYMPTOMS:

When compiling a program which uses the math functions in SINGLE_MATH
or DOUBLE_MATH (these are the trancendental functions), es fails
during the link phase.  ln(1) generates error messages stating that
the math functions cannot be found.  This is despite placing "-lm" in
the "EXTERNAL:" field of the SDF.


CAUSE:

"es" generates a linker command with "-lm" ahead of
"/usr/local/Eiffel/files/_run_time.a" which references the C library
math functions.  Since the linker processes libraries in command line
order, it fails to pick up the appropriate functions from libm.a.  Use
"es -e" to see this command line.


WORKAROUND:

Place the following line in your SDF (change pathnames to suit your
local installation):

	EXTERNAL:       /usr/local/Eiffel/files/_run_time.a -lm

This will ensure that the linker knows what functions it needs from
libm.a.


N.B.  The viewer library _db_vw.a seems to define the same functions
as _run_time.a.  This has caused "rinfinite: defined twice" messages
to emerge from the linker.  The workaround appears to be the same, but
I am not sure exactly what is happening here, so your milage may vary.

Paul.

---
Paul Johnson | Internet: paj@uk.co.gec-mrc | Phone: +44 245 73331 ext 3216
-------------!------------------.----------!-------------------------------
GEC-Marconi Research is not 	| Don't worry: Baldrick has a Cunning Plan!
responsible for my opinions.	| (Graffiti on East side of Berlin Wall)
Technical Details
Message-ID: <423@hic.mrcu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!stc!root44!hrc63!mrcu!hic.uucp!paj

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!stc!root44!hrc63!mrcu!hic.uucp!paj
From: paj@hic.uucp (Paul Johnson)
Newsgroups: comp.lang.eiffel
Subject: Bug Report: math library link order.
Message-ID: <423@hic.mrcu>
Date: 16 Feb 90 15:48:46 GMT
Sender: paj@mrcu
Reply-To: paj@uk.co.gec-mrc (Paul Johnson)
Organization: GEC-Marconi Research Centre, Great Baddow, Essex
Lines: 41