Motion - Bug Report 2005x 09x 15x 185558

BUG: configure issues

LDFLAGS is always lost when using configure.

i.e. line 2721,2856,3145,5439 reliably take care you loose all the LDFLAGS from the environment, CFLAGS has similiar issues as well in some configurations.

CPU optimization can't be chosen, you can choose between optimization for host CPU or no optimization at all.

Test case

Environment

Motion version: 3.2.3
ffmpeg version:  
Shared libraries: ffmpeg, mysql, postgresql
Server OS:  

-- NevDull - 15 Sep 2005

Follow up

I don't understand your bugreport , CPU optimization is chosen without any parameter taking information from /proc/cpuinfo , LDFLAGS has nothing to do in the process. Please send a more expecific reason about this bug.

-- AngelCarpintero - 17 Sep 2005

I believe that the report is correct (there is a problem). If you execute ./configure --help the help info includes the following:

Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>

If you then do something like
bill@billsuper ~/motion $ export LDFLAGS="-g"
bill@billsuper ~/motion $ export CFLAGS="-fboundscheck"
bill@billsuper ~/motion $ echo $LDFLAGS $CFLAGS
-g -fboundscheck
bill@billsuper ~/motion $ ./configure
checking for gcc... gcc
checking for C compiler default output file name... a.out
 ..... (remainder of configure output) .....
MYSQL Support:       Yes
PostgreSQL Support:  No

CFLAGS: -I/usr/include/ffmpeg -g -DHAVE_FFMPEG -DHAVE_MYSQL -I /usr/include/mysql -DTYPE_32BIT="int"
-DHAVE_BSWAP   -march=athlon -mfpmath=sse -msse  -mmmx -m3dnow
LIBS: -lm -lpthread -ljpeg -L/usr/lib -lavformat -lavcodec -lm -lz -L/usr/lib -lmysqlclient -lz
LDFLAGS: -L/usr/lib

Install prefix:       /usr/local
you will note that the previously-set environment values are not included. With regards to "LDFLAGS has nothing to do in the process", the values of these environment variables are used to set the values in the Makefile which is the result of the configuration, i.e. are used every time Motion is re-compiled.

-- BillBrack - 18 Sep 2005

Fix record

You're right , i never used CFLAGS or LDFLAGS from enviroment but in FreeBSD always CC ( Also in a different way works CC=gcc34 ./configure ). Anyway i've attached a patch to configure.in that fix the problem.

-- AngelCarpintero - 21 Sep 2005

I have integrated the fix for both LDFLAGS and --with-jpeg-mmx default off. Will be in 3.2.4_snap3

-- KennethLavrsen - 22 Sep 2005

Released in 3.2.4

-- KennethLavrsen - 18 Dec 2005
I Attachment Action Size Date Who Comment
configure.in-env-jpeg-mmx.patchpatch configure.in-env-jpeg-mmx.patch manage 781 bytes 21 Sep 2005 - 21:11 AngelCarpintero environment fix + jpeg-mmx no detected by defaul , it needs to be set with --with-jpeg-mmx or --with-jpeg-mmx=dir
configure.in-fixed-env.patchpatch configure.in-fixed-env.patch manage 541 bytes 21 Sep 2005 - 18:40 AngelCarpintero environment fix
Topic revision: r7 - 18 Dec 2005, KennethLavrsen
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.