SourceForge has been redesigned. Learn more.
Close

#408 additional config for INSTALL_ROOT

Test Required
closed-fixed
5
2009-01-17
2006-05-17
Anonymous
No

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

Discussion

  • Karl Waclawek

    Karl Waclawek - 2006-05-17

    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?

     
  • Nobody/Anonymous

    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.

     
  • Karl Waclawek

    Karl Waclawek - 2006-06-01

    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.

     
  • Fred L. Drake, Jr.

    • summary: additional conig for INSTALL_ROOT --> additional config for INSTALL_ROOT
     
  • Nobody/Anonymous

    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)

     
  • Nobody/Anonymous

    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.

     
  • Nobody/Anonymous

    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

     
  • Karl Waclawek

    Karl Waclawek - 2006-11-26

    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.

     
  • Todd Rinaldo

    Todd Rinaldo - 2006-12-04

    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

     
  • Karl Waclawek

    Karl Waclawek - 2006-12-13

    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.

     
  • Karl Waclawek

    Karl Waclawek - 2006-12-13
    • milestone: --> Test Required
    • status: open --> open-fixed
     
  • Todd Rinaldo

    Todd Rinaldo - 2006-12-14

    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

     
  • Michael Haubenwallner

    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 ?

     
  • Karl Waclawek

    Karl Waclawek - 2007-05-05

    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.

     
  • Michael Haubenwallner

    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 ?

     
  • Karl Waclawek

    Karl Waclawek - 2007-05-09

    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?

     
  • kosch

    kosch - 2007-05-09

    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

     
  • Michael Haubenwallner

    Logged In: YES
    user_id=839786
    Originator: NO

    > Traditionally we use INSTALL_ROOT @ expat. But (especially in GNU world)
    > many people use DESTDIR. To reduce confusions, I intendet to support both
    > variables.

    As you do not use DESTDIR as make-argument, but INSTALL_ROOT as environment variable,
    my proposed change should work, because INSTALL_ROOT itself is not defined in the Makefile,
    and thus the environment-value of INSTALL_ROOT is used for DESTDIR (see also '-e' below).

    In GNU world, DESTDIR normally is used as make-parameter, not from environment, so when
    DESTDIR is set as make-argument, INSTALL_ROOT environment variable becomes irrelevant.

    > 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.

    Agreed somewhat - but if it is that easy to avoid an additional specific dependency,
    why not do it (especially if you do not need to fix it yourself) ?

    > 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.

    This only is true if you pass '-e' to make(1), as stated in the manpages,
    it is _not_ done by default:
    -e, --environment-overrides
    Give variables taken from the environment precedence over vari-
    ables from makefiles.

    According to their manpages, this is true for GNU-make as well as native make
    on hpux, aix, solaris, freebsd, interix (do not have access to others).

    With my proposed patch, both your methods should work.
    It will not work only if you:
    1) have DESTDIR in the environment set to a value != INSTALL_ROOT
    2) _and_ pass '-e' to make (commandline or in MAKEFLAGS/MFLAGS environment variable).

     
  • Karl Waclawek

    Karl Waclawek - 2007-05-09

    Logged In: YES
    user_id=290026
    Originator: NO

    Before Enrico's change, we had exactly what Michael is suggesting,
    only that the roles of DESTDIR and INSTALL_ROOT were exchanged.

    Why does the newest proposal work, and not the the way it used to be
    before the we introduced the conditional? Does this have to do with
    how each of them is "usually" used?

    By changing to the new proposal, whose usage patterns would we break?

     
  • Karl Waclawek

    Karl Waclawek - 2007-05-09

    Logged In: YES
    user_id=290026
    Originator: NO

    Correction:
    I went back to CVS and realized, before Enrico's patch, neither
    INSTALL_ROOT and DESTDIR were handled in the makefile.

    So I went ahead and committed the latest proposal.
    Applied in Makefile.in rev. 1.58.

    Please check out and test.

     
  • Michael Haubenwallner

    Logged In: YES
    user_id=839786
    Originator: NO

    Works as (I have) expected here on solaris9, solaris10, aix53, hpux11.11, hpux11.23 and interix now, thanks!

     
  • Karl Waclawek

    Karl Waclawek - 2007-05-10

    Logged In: YES
    user_id=290026
    Originator: NO

    Good!
    Now, if Enrico confirms that it still works for him, I'll close this issue as fixed.

     
  • Karl Waclawek

    Karl Waclawek - 2009-01-17
    • status: open-fixed --> closed-fixed
     
  • Karl Waclawek

    Karl Waclawek - 2009-01-17

    No complaints received.

     

Log in to post a comment.