Home My Page Projects GMP-ECM (Elliptic Curve Method)
Summary Activity Forums Tracker Lists Tasks Docs News SCM Files

[#10648] libecm.la includes build directory in dependency_libs when asm redc is used

Date:
2010-06-30 12:11
Priority:
3
State:
Closed
Submitted by:
Vincent Lefèvre (vlefevre)
Assigned to:
Nobody (None)
Category:
none
Group:
none
Resolution:
Fixed
Summary:
libecm.la includes build directory in dependency_libs when asm redc is used

Detailed description
With GMP-ECM 6.3 under Linux/x86_64 (similar problem under Mac OS X / powerpc64):

$ ./configure --prefix=$HOME/ecm
$ make
$ grep dependency_libs= libecm.la
dependency_libs=' -L/home/vlefevre/software/ecm-6.3/x86_64 -lm'

Here /home/vlefevre/software/ecm-6.3/x86_64 is my build directory. As it can disappear or contain something else in the future (possibly belonging to another user), it shouldn't appear in libecm.la.

Possible security problem if such flags are used when compiling some other software?

Note: I've noticed that with the Debian package (based on 6.2), the libecm.la file is not installed.
Message  ↓
Date: 2010-07-02 14:34
Sender: Paul Zimmermann

patch included in svn 1519. Thanks Vincent.

Date: 2010-07-02 07:39
Sender: Vincent Lefèvre

Just a note to say that r1517 doesn't really solve the problem since -lmulredc is added to libecm.la (this is incorrect since libmulredc is a convenience library, i.e. that is not installed, thus should not be referenced).

With the additional change in my previous message (from 2010-07-02 09:31), one just has:

dependency_libs=' -lm'

(no references to the convenience library at all), which is correct.

Date: 2010-07-02 07:31
Sender: Vincent Lefèvre

After looking at the tests/cdemo example from the libtool source (cited by the libtool manual as a demonstration of libtool convenience libraries), replacing

libecm_la_LIBADD = $(MULREDCLIBRARY)

by

libecm_la_LIBADD = $(builddir)/$(ASMPATH)/libmulredc.la

under the "if ENABLE_ASM_REDC" seems to solve the problem.

Date: 2010-07-01 15:32
Sender: Paul Zimmermann

this problem is solved in svn 1517, however I'm not sure the
solution is the best one. Someone who knows better libtool
could find a better solution.

Date: 2010-06-30 12:53
Sender: Paul Zimmermann

we could replace lib_LTLIBRARIES by noinst_LTLIBRARIES in
Makefile.am, but then libecm.a is not installed either.

I don't know how to install libecm.a and not libecm.la.

I don't know either how to remove -L... from the libtool
dependency_libs.

Field Old Value Date By
close_date2010-07-02 14:342010-07-02 14:34zimmerma
status_idOpen2010-07-01 15:32zimmerma
close_date2010-07-01 15:322010-07-01 15:32zimmerma
ResolutionAccepted2010-07-01 15:32zimmerma
ResolutionNone2010-06-30 12:53zimmerma