problems compiling BASH

I am new to the QNX world and am trying to compile bash from the source code. After configuring with:
…/configure --build=gnu --host=pentiumpro --target=qnx (which configures fine), I run make which returns:

make

/bin/sh ./support/mkversion.sh -b -s release -d 2.03 -p 0 -o newversion.h
&& mv newversion.h version.h


  •                                                     *
    
  • Making Bash-2.03.0-release for a i686 running none
  •                                                     *
    

rm -f shell.o
gcc -DPROGRAM=’“bash”’ -DCONF_HOSTTYPE=’“i686”’ -DCONF_OSTYPE=’“none”’ -DCONF_MACHTYPE=’“i686-inte
l-none”’ -DCONF_VENDOR=’“intel”’ -DSHELL -DHAVE_CONFIG_H -I. -I. -I./lib -I/usr/local/include -g
-O2 -c shell.c
In file included from shell.c:74:
lib/glob/fnmatch.h:46: conflicting types for fnmatch' /usr/include/unistd.h:409: previous declaration of fnmatch’
make: *** [shell.o] Error 1

Does anybody have any ideas? Is anyone else running bash?

Tks

Chris

There was precompiled binary package with bash-2.04

Chris Payne wrote:

I am new to the QNX world and am trying to compile bash from the source code. After configuring with:
./configure --build=gnu --host=pentiumpro --target=qnx (which configures fine), I run make which returns:

make

/bin/sh ./support/mkversion.sh -b -s release -d 2.03 -p 0 -o newversion.h
&& mv newversion.h version.h


  •                                                     *
    
  • Making Bash-2.03.0-release for a i686 running none
  •                                                     *
    

rm -f shell.o
gcc -DPROGRAM=’“bash”’ -DCONF_HOSTTYPE=’“i686”’ -DCONF_OSTYPE=’“none”’ -DCONF_MACHTYPE=’“i686-inte
l-none”’ -DCONF_VENDOR=’“intel”’ -DSHELL -DHAVE_CONFIG_H -I. -I. -I./lib -I/usr/local/include -g
-O2 -c shell.c
In file included from shell.c:74:
lib/glob/fnmatch.h:46: conflicting types for fnmatch' /usr/include/unistd.h:409: previous declaration of fnmatch’
make: *** [shell.o] Error 1

Does anybody have any ideas? Is anyone else running bash?

Tks

Chris

it is at www.qnxstart.com


Jordan Ostreff <jostreff@mobikom.com> wrote in message
news:39D4B767.42C48701@mobikom.com

There was precompiled binary package with bash-2.04

Chris Payne wrote:

I am new to the QNX world and am trying to compile bash from the source
code. After configuring with:
./configure --build=gnu --host=pentiumpro --target=qnx (which configures
fine), I run make which returns:

make

/bin/sh ./support/mkversion.sh -b -s release -d 2.03 -p 0 -o
newversion.h
&& mv newversion.h version.h


  •                                                     *
    
  • Making Bash-2.03.0-release for a i686 running none
  •                                                     *
    

rm -f shell.o

gcc -DPROGRAM=’“bash”’ -DCONF_HOSTTYPE=’“i686”’ -DCONF_OSTYPE=’“none”’ -DCO

NF_MACHTYPE=’"i686-inte

l-none"’ -DCONF_VENDOR=’“intel”’ -DSHELL -DHAVE_CONFIG_H -I. -I. -I./lib

-I/usr/local/include -g

-O2 -c shell.c
In file included from shell.c:74:
lib/glob/fnmatch.h:46: conflicting types for fnmatch' /usr/include/unistd.h:409: previous declaration of fnmatch’
make: *** [shell.o] Error 1

Does anybody have any ideas? Is anyone else running bash?

Tks

Chris

Chris Payne wrote:

I am new to the QNX world and am trying to compile bash from the source code. After configuring with:
./configure --build=gnu --host=pentiumpro --target=qnx (which configures fine), I run make which returns:

make

/bin/sh ./support/mkversion.sh -b -s release -d 2.03 -p 0 -o newversion.h
&& mv newversion.h version.h


  •                                                     *
    
  • Making Bash-2.03.0-release for a i686 running none
  •                                                     *
    

rm -f shell.o
gcc -DPROGRAM=’“bash”’ -DCONF_HOSTTYPE=’“i686”’ -DCONF_OSTYPE=’“none”’ -DCONF_MACHTYPE=’“i686-inte
l-none”’ -DCONF_VENDOR=’“intel”’ -DSHELL -DHAVE_CONFIG_H -I. -I. -I./lib -I/usr/local/include -g
-O2 -c shell.c
In file included from shell.c:74:
lib/glob/fnmatch.h:46: conflicting types for `fnmatch’

Is there a #IFDEF here? I wouldn’t want to dig up bash sources =)
I would guess there is something and you could do -DHAVE_UNISTD_H or
something that the configure couldn’t figure out.

… or you could add that or dyke out the code.

… and let the bash/autoconf people know to get a fix merged =)

/usr/include/unistd.h:409: previous declaration of `fnmatch’
make: *** [shell.o] Error 1

The problem is caused by incorrect function prototypes within the bash header
files, i.e. some parametes do not have the ‘const’ qualifier. You can build the
package when you define const to nothing, e.g. with a -Dcons=
in the CFLAGS variable in the Makefiles.

Chris Payne wrote:

I am new to the QNX world and am trying to compile bash from the source code. After configuring with:
./configure --build=gnu --host=pentiumpro --target=qnx (which configures fine), I run make which returns: