[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lzip-bug] build issues - AIX and not gcc

From: Michael Felt
Subject: Re: [Lzip-bug] build issues - AIX and not gcc
Date: Sun, 12 Feb 2017 15:55:03 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:50.0) Gecko/20100101 Thunderbird/50.0

On 11/02/2017 23:19, Antonio Diaz Diaz wrote:
Michael Felt wrote:
I stand corrected - "not working" should be "warns about". Many gnu
projects silently ignore these "standard" arguments. And frankly, I do
not know if one way is "better" than the other. Eye of the beholder.

I personally prefer the warnings. They make easier to know what options are not used and can be removed.

And, more directly - it starts by always assuming CXX=g++ - even with
CXX set to something else in the environment:

Setting environment variables for configure is deprecated because running configure in varying environments can be extremely dangerous. The configure script of lzip implements the method recommended by autoconf to pass variables[1][2].

I am old school...
In any case, './configure CXX=<your_compiler>' is guaranteed to work.
Learned something new - as I said old school, so I frequently (read, per habit) do XXX=yyy my_cmd - rather than my_cmd XXX=yyy

[1]http://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Defining-Variables.html Variables not defined in a site shell script can be set in the environment passed to configure. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the configure command line, using ‘VAR=value’. For example:

     ./configure CC=/usr/local2/bin/gcc

[2]http://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Setting-Output-Variables.html Indeed, while configure can notice the definition of CC in ‘./configure CC=bizarre-cc’, it is impossible to notice it in ‘CC=bizarre-cc ./configure’, which, unfortunately, is what most users do.

Ah - I guess I am one of the most :P

As the issue is that $< is not expanded to foo.cc I would assume that
.cc is not in the "OEM" make RULES.

Maybe your make does not recognize $< in normal rules like the rule for main.o. I find this an annoying limitation of some makes because using $< is less error prone than repeating the name of the prerequisite.
Annoying it is.

Best regards,

So, calling it as you recommend - still get unworkable CXXFLAGS (-W means something different for xlc++)

        ../src/lzip-1.18/configure CXX=xlc++\
                --prefix=/opt \
configure: WARNING: unrecognized option: '--sysconfdir=/var/lzip/etc'
configure: WARNING: unrecognized option: '--sharedstatedir=/var/lzip/com'
configure: WARNING: unrecognized option: '--localstatedir=/var/lzip'

creating config.status
creating Makefile
VPATH = ../src/lzip-1.18
prefix = /opt
exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
datarootdir = $(prefix)/share
infodir = /opt/share/info/lzip
mandir = /usr/share/man
CXX = xlc++
OK. Now you can run make.

xlc++  -W -O2 -c -o arg_parser.o ../src/lzip-1.18/arg_parser.cc
xlc++: 1501-208 (S) command option W is missing a subargument
Makefile:49: recipe for target 'arg_parser.o' failed
make: *** [arg_parser.o] Error 40

I suppose I can add CXXFLAGS="-O3", or "-O2", etc. but that nearly defeats the purpose of ./configure.


Lzip-bug mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]