[Expat-bugs] [ expat-Bugs-1490371 ] additional config for INSTALL_ROOT

SourceForge.net noreply at sourceforge.net
Wed May 9 18:15:32 CEST 2007


Bugs item #1490371, was opened at 2006-05-17 18:36
Message generated for change (Comment added) made by kosch
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1490371&group_id=10127

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: www.libexpat.org
Group: Test Required
Status: Open
Resolution: Fixed
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: additional config for INSTALL_ROOT

Initial Comment:
When I install expat 2.0.0, it shows me the following 
error always.  but expat 1.9.5 is fine.

camelot# make install
make: Fatal error in reader: Makefile, line 48: 
Unexpected end of line seen

the line 48 is as following:
47:ifndef INSTALL_ROOT
48:INSTALL_ROOT=$(DESTDIR)
49:if


----------------------------------------------------------------------

Comment By: kosch (kosch)
Date: 2007-05-09 18:15

Message:
Logged In: YES 
user_id=34470
Originator: NO

Hi folks,


as I'm the one who introduced that change I should tell you why I did it
that way:

Traditionally we use INSTALL_ROOT @ expat. But (especially in GNU world)
many people use DESTDIR. To reduce confusions, I intendet to support both
variables. 
The order is irrelevant for me, so I assume either one of them is set (if
both, they really should have the same value). In case of not being empty,
it should stay so.

I'm not sure how non-GNU make's handle conditionals - I never used 'em
;-O
But I really suggest evryone to use GNU make, even on nun-GNU platforms
(AFAIK it should run on most other unix'es too). This releaves us from the
ugly job of supporting each single esotic make.

Ah, important to mention: env variables should *NOT* be overwritten by
defaults. It really should be irrelevant if I cal "INSTALL_ROOT=... make"
or "make install INSTALL_ROOT=...". This makes distro-maintainer/sysop's
life much, much easier.


cu

----------------------------------------------------------------------

Comment By: Karl Waclawek (kwaclaw)
Date: 2007-05-09 03:23

Message:
Logged In: YES 
user_id=290026
Originator: NO

> I've got another idea now:
> If you really need/want to support the latter, completely switch to
DESTDIR,
> and use $(INSTALL_ROOT) as the default-value for DESTDIR:

Can anyone conform that this will do the same job as the existing make
instructions?
Fred? Greg?

----------------------------------------------------------------------

Comment By: Michael Haubenwallner (mhaubi)
Date: 2007-05-07 10:50

Message:
Logged In: YES 
user_id=839786
Originator: NO

Hmm, in those two bugs they all want to use DESTDIR, not INSTALL_ROOT.
Thus I cannot find a reason for setting INSTALL_ROOT only if empty or
undefined.

Non-GNU make do not understand any "if" direction, this is a GNU-make
extension only.

AFAIKT package builders want to use (the automake-style):
    $ make install DESTDIR=/path/to/imagedir
instead of (which style is this one ?):
    $ INSTALL_ROOT=/path/to/imagedir make install

've got another idea now:
If you really need/want to support the latter, completely switch to
DESTDIR,
and use $(INSTALL_ROOT) as the default-value for DESTDIR:

<patch-snippet>
-ifndef INSTALL_ROOT
-INSTALL_ROOT=$(DESTDIR)
-endif
+DESTDIR=$(INSTALL_ROOT)

 install: xmlwf/xmlwf installlib
-    $(mkinstalldirs) $(INSTALL_ROOT)$(bindir) $(INSTALL_ROOT)$(man1dir)
+    $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
</patch-snippet>

Why this works:
   $ make install DESTDIR=/path/to/image
overrides the in-makefile set DESTDIR, while both
   $ INSTALL_ROOT=/path/to/image make install
   $ make install INSTALL_ROOT=/path/to/image
use DESTDIR=$(INSTALL_ROOT), even if DESTDIR eventually is defined in the
environment,
because variable-setting priority is
1) commandline
2) in-makefile
3) environment

Or do you have other requirements I've not seen yet ?

----------------------------------------------------------------------

Comment By: Karl Waclawek (kwaclaw)
Date: 2007-05-05 19:27

Message:
Logged In: YES 
user_id=290026
Originator: NO

The reason why the condition syntax was introduced is to support package
builders.
See bugs # 985235, 1217217 and patch # 779334.

Now, we have to concede that Expat builds are targeted towards the GNU
tool chain.
We do try hard to  make our build system work on other platforms, but the
syntax of
make file is unfortunately too different on the various platforms, so we
really can't
satisfy everyone.

In an attempt to make Makefile.in more compatibl across platforms I have
modified
the conditional directive above yet again:

ifeq ($(INSTALL_ROOT),)
INSTALL_ROOT = $(DESTDIR)
endif

Let's hope this will be more successful. 
Applied in Makefile.in rev. 1.57.


----------------------------------------------------------------------

Comment By: Michael Haubenwallner (mhaubi)
Date: 2007-01-25 14:18

Message:
Logged In: YES 
user_id=839786
Originator: NO

Using "INSTALL_ROOT ?= ${DESTDIR}" still seems to work with GNU make
only.
It does not work with native make at least on these platforms:
hpux11.11, hpux11.23, aix5.2, solaris2.9

I have tried expat-2.0.0 with changing the "ifndef-endif" to "?="

Question is why setting INSTALL_ROOT unconditionally is not sufficient ?
  INSTALL_ROOT = ${DESTROOT}

Thing is, when calling
   make install INSTALL_ROOT=/some/install/root
the commandline value has precedence over the value set in Makefile, so
for this
style of doing 'make install' there is no need to set INSTALL_ROOT
conditionally.

OTOH, an automake-using package needs to be installed using this style:
   make install DESTDIR=/some/install/root
This works if there is no condition, but it may not work if INSTALL_ROOT
is preset
in the environment...

Well, I can think of only one (uncommon?) style of doing 'make install'
which requires that condition:
   INSTALL_ROOT=/some/install/root make install

Has this style been used in the past ?
And if so, is there any requirement where this style needs to continue to
work ?


----------------------------------------------------------------------

Comment By: Todd Rinaldo (todd_rinaldo)
Date: 2006-12-14 01:17

Message:
Logged In: YES 
user_id=1660778
Originator: NO

Yep removing the 3 lines seems to correct the problem on Solaris CC

ifndef INSTALL_ROOT
INSTALL_ROOT=$(DESTDIR)
endif


----------------------------------------------------------------------

Comment By: Karl Waclawek (kwaclaw)
Date: 2006-12-13 18:29

Message:
Logged In: YES 
user_id=290026
Originator: NO

It seems the ifndef syntax is only supported by GNU Make. 
I think that using "?=" instead is acceptable, although it is not the
same.
It only assigns if the symbol is undefined, whereas "ifndef" assigns when
the
symbol is the empty string or undefined. Made the change accordingly.
Committed in Makefile.in rev. 1.56.

----------------------------------------------------------------------

Comment By: Todd Rinaldo (todd_rinaldo)
Date: 2006-12-04 22:13

Message:
Logged In: YES 
user_id=1660778
Originator: NO

I too am having this problem... downloaded the gz, not the CVS
./configure --prefix=/apps/customdir/perl588_32/site

----------------------------------------------------------------------

Comment By: Karl Waclawek (kwaclaw)
Date: 2006-11-26 19:07

Message:
Logged In: YES 
user_id=290026
Originator: NO

What happens if you check out from CVS and then run make-release.sh to
build
your own tarball? Does that work? If no response I'll close this issue.

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2006-10-04 18:54

Message:
Logged In: NO 

Same problem with the .gz file

  expat-2.0.0
  Solaris 5.10

root cosmo #./configure
checking build system type... sparc-sun-solaris2.10
checking host system type... sparc-sun-solaris2.10
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for a sed that does not truncate output... /usr/bin/sed
checking for egrep... egrep
checking for ld used by gcc... /usr/ccs/bin/ld
checking if the linker (/usr/ccs/bin/ld) is GNU ld... no
checking for /usr/ccs/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/ccs/bin/nm -p
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for f77... f77
checking whether we are using the GNU Fortran 77 compiler... no
checking whether f77 accepts -g... yes
checking the maximum length of command line arguments... 262144
checking command to parse /usr/ccs/bin/nm -p output from gcc
object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/ccs/bin/ld) supports
shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... solaris2.10 ld.so
checking how to hardcode library paths into programs...
immediate
checking whether stripping libraries is possible... no
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/ccs/bin/ld
checking if the linker (/usr/ccs/bin/ld) is GNU ld... no
checking whether the g++ linker (/usr/ccs/bin/ld) supports
shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/ccs/bin/ld) supports
shared libraries... yes
checking dynamic linker characteristics... solaris2.10 ld.so
checking how to hardcode library paths into programs...
immediate
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for f77 option to produce PIC... -fPIC
checking if f77 PIC flag -fPIC works... no
checking if f77 static flag -static works... no
checking if f77 supports -c -o file.o... yes
checking whether the f77 linker (/usr/ccs/bin/ld) supports
shared libraries... yes
checking dynamic linker characteristics... f90: Warning:
Option -print-search-dirs passed to ld, if ld is invoked,
ignored otherwise
Usage: f90 [ options ] files.  Use 'f90 -flags' for details
solaris2.10 ld.so
checking how to hardcode library paths into programs...
immediate
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking for a BSD-compatible install... conftools/install-sh -c
checking whether gcc accepts -fexceptions... yes
checking for ANSI C header files... (cached) yes
checking whether byte ordering is bigendian... yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking for memmove... yes
checking for bcopy... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for unistd.h... (cached) yes
checking for off_t... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... yes
checking for working mmap... yes
checking for an ANSI C99-conforming __func__... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating expat_config.h
config.status: expat_config.h is unchanged

root cosmo #make
make: Fatal error in reader: Makefile, line 48: Unexpected
end of line seen


----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2006-07-27 21:32

Message:
Logged In: NO 

Sorry, it's Solaris 9 :-).  But you get the idea - same 
error as other people.  I also tried './configure --prefix 
=/usr/local', no difference.

Changed
ifndef INSTALL_ROOT
INSTALL_ROOT=$(DESTDIR)
endif
to
INSTALL_ROOT=$(prefix)

and it put eveything in /usr/local/usr/local.  Perhaps a 
Solaris/GNU make syntax problem.  Tried GNU make, no luck.


----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2006-07-27 20:46

Message:
Logged In: NO 

I'm getting the same error, expat-2.0.0.tar.gz, Solaris 8 
on Sparc, using Sun Forte 7 cc.

zeus:/tmp/expat-2.0.0# which make
/usr/ccs/bin/make
zeus:/tmp/expat-2.0.0# which cc
/opt/forte7/SUNWspro/bin/cc


zeus:/tmp/expat-2.0.0# ./configure
checking build system type... sparc-sun-solaris2.9
checking host system type... sparc-sun-solaris2.9
checking for gcc... no
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... no
checking whether cc accepts -g... yes
checking for cc option to accept ANSI C... none needed
checking for a sed that does not truncate 
output... /usr/bin/sed
checking for egrep... egrep
checking for non-GNU ld... /usr/ucb/ld
checking if the linker (/usr/ucb/ld) is GNU ld... no
checking for /usr/ucb/ld option to reload object files... -
r
checking for BSD-compatible nm... /usr/ccs/bin/nm -p
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... cc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... no
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... CC
checking whether we are using the GNU C++ compiler... no
checking whether CC accepts -g... yes
checking how to run the C++ preprocessor... CC -E
checking for g77... no
checking for f77... f77
checking whether we are using the GNU Fortran 77 
compiler... no
checking whether f77 accepts -g... yes
checking the maximum length of command line arguments... 
262144
checking command to parse /usr/ccs/bin/nm -p output from 
cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking for cc option to produce PIC... -KPIC
checking if cc PIC flag -KPIC works... yes
checking if cc static flag -Bstatic works... yes
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/ucb/ld) supports 
shared libraries... yes
checking dynamic linker characteristics... solaris2.9 ld.so
checking how to hardcode library paths into programs... 
immediate
checking whether stripping libraries is possible... no
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking whether the CC linker (/usr/ucb/ld) supports 
shared libraries... yes
checking for CC option to produce PIC... -KPIC
checking if CC PIC flag -KPIC works... yes
checking if CC static flag -Bstatic works... yes
checking if CC supports -c -o file.o... yes
checking whether the CC linker (/usr/ucb/ld) supports 
shared libraries... yes
checking dynamic linker characteristics... solaris2.9 ld.so
checking how to hardcode library paths into programs... 
immediate
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for f77 option to produce PIC... -KPIC
checking if f77 PIC flag -KPIC works... yes
checking if f77 static flag -Bstatic works... yes
checking if f77 supports -c -o file.o... yes
checking whether the f77 linker (/usr/ucb/ld) supports 
shared libraries... yes
checking dynamic linker characteristics... solaris2.9 ld.so
checking how to hardcode library paths into programs... 
immediate
checking for gcc... (cached) cc
checking whether we are using the GNU C compiler... 
(cached) no
checking whether cc accepts -g... (cached) yes
checking for cc option to accept ANSI C... (cached) none 
needed
checking for a BSD-compatible install... conftools/install-
sh -c
checking for ANSI C header files... (cached) yes
checking whether byte ordering is bigendian... yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking for memmove... yes
checking for bcopy... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for unistd.h... (cached) yes
checking for off_t... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... yes
checking for working mmap... yes
checking for an ANSI C99-conforming __func__... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating expat_config.h


zeus:/tmp/expat-2.0.0# make
make: Fatal error in reader: Makefile, line 48: Unexpected 
end of line seen


INSTALL_ROOT=$(DESTDIR)



----------------------------------------------------------------------

Comment By: Karl Waclawek (kwaclaw)
Date: 2006-06-01 23:01

Message:
Logged In: YES 
user_id=290026

Could you please try a checkout from CVS.
If you still have a problem, then maybe "make" on your
system is too old, or otherwise different.

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2006-06-01 22:33

Message:
Logged In: NO 

I'm having the same problem building in a Solaris 10 on 
Sparc environment.  I'm using 2.0.0 from a .gz tarball.

----------------------------------------------------------------------

Comment By: Karl Waclawek (kwaclaw)
Date: 2006-05-17 19:19

Message:
Logged In: YES 
user_id=290026

In which environment do you try to build expat?
Is this a checkout from CVD or did you download the .gz archive?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1490371&group_id=10127


More information about the Expat-bugs mailing list