[Urgent] ./bootstrap.sh from boost_1_70_0 is failing in SunOS

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

[Urgent] ./bootstrap.sh from boost_1_70_0 is failing in SunOS

Boost - Users mailing list
Hi All,

Thanks for your support!!!

In SunOS platform, The bootstrap.sh from boost_1_70_0 failed with error " ./build.sh: syntax error at line 143: `machine=$' unexpected "
Can any one look into it and kindly suggest how to fix this issue and proceed further.

It is blocking our current project build!!!

PFB, the details:

$ uname -a
SunOS kamal Generic_150401-55 i86pc i386 i86pc

$ cd 3rdparty/boost/tools/build
$ ls
boost-build.jam    bootstrap.bat      CONTRIBUTING.rst   example            Jamroot.jam        notes              src
bootstrap_vms.com  bootstrap.sh       doc                index.html         LICENSE.txt        README.rst         test
$ ./bootstrap.sh
-n Bootstrapping the build engine with toolset sun...

Failed to bootstrap the build engine
Consult 'bootstrap.log' for more details

$ cat bootstrap.log
./build.sh: syntax error at line 143: `machine=$' unexpected

Thanks,
Kamal

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users

bootstrap.sh (3K) Download Attachment
build.sh (15K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Urgent] ./bootstrap.sh from boost_1_70_0 is failing in SunOS

Boost - Users mailing list
build.sh is intended for /bin/sh but uses bash-specific syntax $(command)

You need to either change first line to #!/bin/bash or change line 143 to machine=`gcc -dumpmachine 2>/dev/null` which is /bin/sh's way to express $(...)
Seems that Solaris's /bin/sh is really what the name says - the old POSIX shell where on Linux it is a symbolic link to bash

czw., 28 lis 2019 o 06:32 kamallochan Jena via Boost-users <[hidden email]> napisał(a):
Hi All,

Thanks for your support!!!

In SunOS platform, The bootstrap.sh from boost_1_70_0 failed with error " ./build.sh: syntax error at line 143: `machine=$' unexpected "
Can any one look into it and kindly suggest how to fix this issue and proceed further.

It is blocking our current project build!!!

PFB, the details:

$ uname -a
SunOS kamal Generic_150401-55 i86pc i386 i86pc

$ cd 3rdparty/boost/tools/build
$ ls
boost-build.jam    bootstrap.bat      CONTRIBUTING.rst   example            Jamroot.jam        notes              src
bootstrap_vms.com  bootstrap.sh       doc                index.html         LICENSE.txt        README.rst         test
$ ./bootstrap.sh
-n Bootstrapping the build engine with toolset sun...

Failed to bootstrap the build engine
Consult 'bootstrap.log' for more details

$ cat bootstrap.log
./build.sh: syntax error at line 143: `machine=$' unexpected

Thanks,
Kamal
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: [Urgent] ./bootstrap.sh from boost_1_70_0 is failing in SunOS

Boost - Users mailing list
Le 28/11/2019 à 12:22, Piotr Kowalski via Boost-users a écrit :
> build.sh is intended for /bin/sh but uses bash-specific syntax $(command)

$() is part of POSIX though so I suppose the SunOS default shell isn't
POSIX compliant or too old.

Regards,

--
David
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: [Urgent] ./bootstrap.sh from boost_1_70_0 is failing in SunOS

Boost - Users mailing list
I guess SunOS uses System V specification which is older than POSIX and only supports `` syntax. If you look at autotools they never generate $() to make sure it wil work everywhere even on older /bin/sh

czw., 28 lis 2019 o 14:33 David Demelier via Boost-users <[hidden email]> napisał(a):
Le 28/11/2019 à 12:22, Piotr Kowalski via Boost-users a écrit :
> build.sh is intended for /bin/sh but uses bash-specific syntax $(command)

$() is part of POSIX though so I suppose the SunOS default shell isn't
POSIX compliant or too old.

Regards,

--
David
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: [Urgent] ./bootstrap.sh from boost_1_70_0 is failing in SunOS

Boost - Users mailing list
Hi Piotr and David, 
    Thank you for your response.

Have modified the build.sh as mentioned, and for all below cases build.sh is failing with Error:  ld: fatal: symbol referencing errors. No output written to bootstrap/jam0

Case 1>     #!/bin/sh   --->  #!/bin/bash
Case 2>     machine=$(gcc -dumpmachine 2>/dev/null)   ---> machine=`gcc -dumpmachine 2>/dev/null`
Case 3>     machine=$(gcc -dumpmachine 2>/dev/null)   --->  machine=` echo $(gcc -dumpmachine 2>/dev/null) `
   
FYI, default shell of SunOS is /bin/sh
        $ echo $SHELL
        /bin/sh

Details:
  $ ./bootstrap.sh
      -n Bootstrapping the build engine with toolset sun...

      Failed to bootstrap the build engine
      Consult 'bootstrap.log' for more details

  $ cat bootstrap.log
     ###
     ### Using 'sun' toolset.
     ###
     rm -rf bootstrap
     mkdir bootstrap
     cc -o bootstrap/jam0 command.c compile.c constants.c debug.c execcmd.c frames.c function.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c pathsys.c regexp.c rules.c scan.c search.c subst.c timestamp.c        variable.c modules.c strings.c filesys.c builtins.c class.c cwd.c native.c md5.c w32_getreg.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c execunix.c fileunix.c pathunix.c
      command.c:
      compile.c:
      constants.c:
      debug.c:
      execcmd.c:
      frames.c:
      function.c:
      glob.c:
      hash.c:
      hdrmacro.c:
      headers.c:
      jam.c:
      jambase.c:
      jamgram.c:
      lists.c:
      make.c:
      make1.c:
      object.c:
      option.c:
      output.c:
      parse.c:
      pathsys.c:
      regexp.c:
      rules.c:
      scan.c:  search.c:
      subst.c:
      timestamp.c:
      variable.c:
      modules.c:
      strings.c:
      filesys.c:
      builtins.c:
      class.c:
      cwd.c:
      native.c:
      md5.c:
      w32_getreg.c:
      modules/set.c:
      modules/path.c:
      modules/regex.c:
      modules/property-set.c:
      modules/sequence.c:
      modules/order.c:
      execunix.c:
      fileunix.c:
      pathunix.c:
      Undefined                       first referenced
      symbol                             in file
      clock_gettime                       timestamp.o
      ld: fatal: symbol referencing errors. No output written to bootstrap/jam0
      bash-3.2$

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

On Thu, Nov 28, 2019 at 7:48 PM Piotr Kowalski via Boost-users <[hidden email]> wrote:
I guess SunOS uses System V specification which is older than POSIX and only supports `` syntax. If you look at autotools they never generate $() to make sure it wil work everywhere even on older /bin/sh

czw., 28 lis 2019 o 14:33 David Demelier via Boost-users <[hidden email]> napisał(a):
Le 28/11/2019 à 12:22, Piotr Kowalski via Boost-users a écrit :
> build.sh is intended for /bin/sh but uses bash-specific syntax $(command)

$() is part of POSIX though so I suppose the SunOS default shell isn't
POSIX compliant or too old.

Regards,

--
David
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: [Urgent] ./bootstrap.sh from boost_1_70_0 is failing in SunOS

Boost - Users mailing list
Hi All,

FYI, 
bootstarp.sh from  boost_1_56_0 working fine in same SunOS, where boost_1_70_0 is causing the problem.

Thanks,
Kamal

On Fri, Nov 29, 2019 at 10:54 AM kamallochan Jena <[hidden email]> wrote:
Hi Piotr and David, 
    Thank you for your response.

Have modified the build.sh as mentioned, and for all below cases build.sh is failing with Error:  ld: fatal: symbol referencing errors. No output written to bootstrap/jam0

Case 1>     #!/bin/sh   --->  #!/bin/bash
Case 2>     machine=$(gcc -dumpmachine 2>/dev/null)   ---> machine=`gcc -dumpmachine 2>/dev/null`
Case 3>     machine=$(gcc -dumpmachine 2>/dev/null)   --->  machine=` echo $(gcc -dumpmachine 2>/dev/null) `
   
FYI, default shell of SunOS is /bin/sh
        $ echo $SHELL
        /bin/sh

Details:
  $ ./bootstrap.sh
      -n Bootstrapping the build engine with toolset sun...

      Failed to bootstrap the build engine
      Consult 'bootstrap.log' for more details

  $ cat bootstrap.log
     ###
     ### Using 'sun' toolset.
     ###
     rm -rf bootstrap
     mkdir bootstrap
     cc -o bootstrap/jam0 command.c compile.c constants.c debug.c execcmd.c frames.c function.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c pathsys.c regexp.c rules.c scan.c search.c subst.c timestamp.c        variable.c modules.c strings.c filesys.c builtins.c class.c cwd.c native.c md5.c w32_getreg.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c execunix.c fileunix.c pathunix.c
      command.c:
      compile.c:
      constants.c:
      debug.c:
      execcmd.c:
      frames.c:
      function.c:
      glob.c:
      hash.c:
      hdrmacro.c:
      headers.c:
      jam.c:
      jambase.c:
      jamgram.c:
      lists.c:
      make.c:
      make1.c:
      object.c:
      option.c:
      output.c:
      parse.c:
      pathsys.c:
      regexp.c:
      rules.c:
      scan.c:  search.c:
      subst.c:
      timestamp.c:
      variable.c:
      modules.c:
      strings.c:
      filesys.c:
      builtins.c:
      class.c:
      cwd.c:
      native.c:
      md5.c:
      w32_getreg.c:
      modules/set.c:
      modules/path.c:
      modules/regex.c:
      modules/property-set.c:
      modules/sequence.c:
      modules/order.c:
      execunix.c:
      fileunix.c:
      pathunix.c:
      Undefined                       first referenced
      symbol                             in file
      clock_gettime                       timestamp.o
      ld: fatal: symbol referencing errors. No output written to bootstrap/jam0
      bash-3.2$

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

On Thu, Nov 28, 2019 at 7:48 PM Piotr Kowalski via Boost-users <[hidden email]> wrote:
I guess SunOS uses System V specification which is older than POSIX and only supports `` syntax. If you look at autotools they never generate $() to make sure it wil work everywhere even on older /bin/sh

czw., 28 lis 2019 o 14:33 David Demelier via Boost-users <[hidden email]> napisał(a):
Le 28/11/2019 à 12:22, Piotr Kowalski via Boost-users a écrit :
> build.sh is intended for /bin/sh but uses bash-specific syntax $(command)

$() is part of POSIX though so I suppose the SunOS default shell isn't
POSIX compliant or too old.

Regards,

--
David
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: [Urgent] ./bootstrap.sh from boost_1_70_0 is failing in SunOS

Boost - Users mailing list
Hi All,

In SunOS, even I am getting below errors which has been reported before by some one and is discussed in "https://github.com/boostorg/thread/issues/283 with Fix.

Error:
./boost/thread/pthread/thread_data.hpp:60:5: error: missing binary operator before token "_sysconf"
 #if PTHREAD_STACK_MIN > 0

If Yes, From where the latest boost kit can be downloaded with above fix ??
Is the above fix, also resolve the previous syntax error "./build.sh: syntax error at line 143: `machine=$' unexpected " ??

Kindly confirm!!!

Regards,
Kamal
 

On Fri, Nov 29, 2019 at 12:52 PM kamallochan Jena <[hidden email]> wrote:
Hi All,

FYI, 
bootstarp.sh from  boost_1_56_0 working fine in same SunOS, where boost_1_70_0 is causing the problem.

Thanks,
Kamal

On Fri, Nov 29, 2019 at 10:54 AM kamallochan Jena <[hidden email]> wrote:
Hi Piotr and David, 
    Thank you for your response.

Have modified the build.sh as mentioned, and for all below cases build.sh is failing with Error:  ld: fatal: symbol referencing errors. No output written to bootstrap/jam0

Case 1>     #!/bin/sh   --->  #!/bin/bash
Case 2>     machine=$(gcc -dumpmachine 2>/dev/null)   ---> machine=`gcc -dumpmachine 2>/dev/null`
Case 3>     machine=$(gcc -dumpmachine 2>/dev/null)   --->  machine=` echo $(gcc -dumpmachine 2>/dev/null) `
   
FYI, default shell of SunOS is /bin/sh
        $ echo $SHELL
        /bin/sh

Details:
  $ ./bootstrap.sh
      -n Bootstrapping the build engine with toolset sun...

      Failed to bootstrap the build engine
      Consult 'bootstrap.log' for more details

  $ cat bootstrap.log
     ###
     ### Using 'sun' toolset.
     ###
     rm -rf bootstrap
     mkdir bootstrap
     cc -o bootstrap/jam0 command.c compile.c constants.c debug.c execcmd.c frames.c function.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c pathsys.c regexp.c rules.c scan.c search.c subst.c timestamp.c        variable.c modules.c strings.c filesys.c builtins.c class.c cwd.c native.c md5.c w32_getreg.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c execunix.c fileunix.c pathunix.c
      command.c:
      compile.c:
      constants.c:
      debug.c:
      execcmd.c:
      frames.c:
      function.c:
      glob.c:
      hash.c:
      hdrmacro.c:
      headers.c:
      jam.c:
      jambase.c:
      jamgram.c:
      lists.c:
      make.c:
      make1.c:
      object.c:
      option.c:
      output.c:
      parse.c:
      pathsys.c:
      regexp.c:
      rules.c:
      scan.c:  search.c:
      subst.c:
      timestamp.c:
      variable.c:
      modules.c:
      strings.c:
      filesys.c:
      builtins.c:
      class.c:
      cwd.c:
      native.c:
      md5.c:
      w32_getreg.c:
      modules/set.c:
      modules/path.c:
      modules/regex.c:
      modules/property-set.c:
      modules/sequence.c:
      modules/order.c:
      execunix.c:
      fileunix.c:
      pathunix.c:
      Undefined                       first referenced
      symbol                             in file
      clock_gettime                       timestamp.o
      ld: fatal: symbol referencing errors. No output written to bootstrap/jam0
      bash-3.2$

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

On Thu, Nov 28, 2019 at 7:48 PM Piotr Kowalski via Boost-users <[hidden email]> wrote:
I guess SunOS uses System V specification which is older than POSIX and only supports `` syntax. If you look at autotools they never generate $() to make sure it wil work everywhere even on older /bin/sh

czw., 28 lis 2019 o 14:33 David Demelier via Boost-users <[hidden email]> napisał(a):
Le 28/11/2019 à 12:22, Piotr Kowalski via Boost-users a écrit :
> build.sh is intended for /bin/sh but uses bash-specific syntax $(command)

$() is part of POSIX though so I suppose the SunOS default shell isn't
POSIX compliant or too old.

Regards,

--
David
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: [Urgent] ./bootstrap.sh from boost_1_70_0 is failing in SunOS

Boost - Users mailing list
Hi Kamal
From what I can see, earlier versions of bootstrap did not use clock_gettime function and that made them link correctly.
This function on Solaris requires linking with -lrt

Since you are doing this only for yourself you can edit build.sh script and add -lrt at the end of line 350:
echo_run ${BOOST_JAM_CC} ${BOOST_JAM_OPT_JAM} ${BJAM_SOURCES} -lrt

If that helps, boost team may need to fix build.sh to add -lrt if building on Solaris platform

pt., 29 lis 2019 o 08:44 kamallochan Jena <[hidden email]> napisał(a):
Hi All,

In SunOS, even I am getting below errors which has been reported before by some one and is discussed in "https://github.com/boostorg/thread/issues/283 with Fix.

Error:
./boost/thread/pthread/thread_data.hpp:60:5: error: missing binary operator before token "_sysconf"
 #if PTHREAD_STACK_MIN > 0

If Yes, From where the latest boost kit can be downloaded with above fix ??
Is the above fix, also resolve the previous syntax error "./build.sh: syntax error at line 143: `machine=$' unexpected " ??

Kindly confirm!!!

Regards,
Kamal
 

On Fri, Nov 29, 2019 at 12:52 PM kamallochan Jena <[hidden email]> wrote:
Hi All,

FYI, 
bootstarp.sh from  boost_1_56_0 working fine in same SunOS, where boost_1_70_0 is causing the problem.

Thanks,
Kamal

On Fri, Nov 29, 2019 at 10:54 AM kamallochan Jena <[hidden email]> wrote:
Hi Piotr and David, 
    Thank you for your response.

Have modified the build.sh as mentioned, and for all below cases build.sh is failing with Error:  ld: fatal: symbol referencing errors. No output written to bootstrap/jam0

Case 1>     #!/bin/sh   --->  #!/bin/bash
Case 2>     machine=$(gcc -dumpmachine 2>/dev/null)   ---> machine=`gcc -dumpmachine 2>/dev/null`
Case 3>     machine=$(gcc -dumpmachine 2>/dev/null)   --->  machine=` echo $(gcc -dumpmachine 2>/dev/null) `
   
FYI, default shell of SunOS is /bin/sh
        $ echo $SHELL
        /bin/sh

Details:
  $ ./bootstrap.sh
      -n Bootstrapping the build engine with toolset sun...

      Failed to bootstrap the build engine
      Consult 'bootstrap.log' for more details

  $ cat bootstrap.log
     ###
     ### Using 'sun' toolset.
     ###
     rm -rf bootstrap
     mkdir bootstrap
     cc -o bootstrap/jam0 command.c compile.c constants.c debug.c execcmd.c frames.c function.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c pathsys.c regexp.c rules.c scan.c search.c subst.c timestamp.c        variable.c modules.c strings.c filesys.c builtins.c class.c cwd.c native.c md5.c w32_getreg.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c execunix.c fileunix.c pathunix.c
      command.c:
      compile.c:
      constants.c:
      debug.c:
      execcmd.c:
      frames.c:
      function.c:
      glob.c:
      hash.c:
      hdrmacro.c:
      headers.c:
      jam.c:
      jambase.c:
      jamgram.c:
      lists.c:
      make.c:
      make1.c:
      object.c:
      option.c:
      output.c:
      parse.c:
      pathsys.c:
      regexp.c:
      rules.c:
      scan.c:  search.c:
      subst.c:
      timestamp.c:
      variable.c:
      modules.c:
      strings.c:
      filesys.c:
      builtins.c:
      class.c:
      cwd.c:
      native.c:
      md5.c:
      w32_getreg.c:
      modules/set.c:
      modules/path.c:
      modules/regex.c:
      modules/property-set.c:
      modules/sequence.c:
      modules/order.c:
      execunix.c:
      fileunix.c:
      pathunix.c:
      Undefined                       first referenced
      symbol                             in file
      clock_gettime                       timestamp.o
      ld: fatal: symbol referencing errors. No output written to bootstrap/jam0
      bash-3.2$

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

On Thu, Nov 28, 2019 at 7:48 PM Piotr Kowalski via Boost-users <[hidden email]> wrote:
I guess SunOS uses System V specification which is older than POSIX and only supports `` syntax. If you look at autotools they never generate $() to make sure it wil work everywhere even on older /bin/sh

czw., 28 lis 2019 o 14:33 David Demelier via Boost-users <[hidden email]> napisał(a):
Le 28/11/2019 à 12:22, Piotr Kowalski via Boost-users a écrit :
> build.sh is intended for /bin/sh but uses bash-specific syntax $(command)

$() is part of POSIX though so I suppose the SunOS default shell isn't
POSIX compliant or too old.

Regards,

--
David
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: [Urgent] ./bootstrap.sh from boost_1_70_0 is failing in SunOS

Boost - Users mailing list

Hi Piotr,

Thank you for your support and update on this issue!!!

As you suggested, I updated build.sh script and add -lrt at the end of line 350, but still facing the same error.
                             echo_run ${BOOST_JAM_CC} ${BOOST_JAM_OPT_JAM} ${BJAM_SOURCES} -lrt

Here is the details of Log: ----------------

$ ./bootstrap.sh
-n Bootstrapping the build engine with toolset sun...

Failed to bootstrap the build engine
Consult 'bootstrap.log' for more details

$ cat bootstrap.log
###
### Using 'sun' toolset.
###
rm -rf bootstrap
mkdir bootstrap
cc -o bootstrap/jam0 command.c compile.c constants.c debug.c execcmd.c frames.c function.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c pathsys.c regexp.c rules.c scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c class.c cwd.c native.c md5.c w32_getreg.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c execunix.c fileunix.c pathunix.c -lrt
command.c:
compile.c:
constants.c:
debug.c:
execcmd.c:
frames.c:
function.c:
glob.c:
hash.c:
hdrmacro.c:
headers.c:
jam.c:
jambase.c:
jamgram.c:
lists.c:
make.c:
make1.c:
object.c:
option.c:
output.c:
parse.c:
pathsys.c:
regexp.c:
rules.c:
scan.c:
search.c:
subst.c:
timestamp.c:
variable.c:
modules.c:
strings.c:
filesys.c:
builtins.c:
class.c:
cwd.c:
native.c:
md5.c:
w32_getreg.c:
modules/set.c:
modules/path.c:
modules/regex.c:
modules/property-set.c:
modules/sequence.c:
modules/order.c:
execunix.c:
fileunix.c:
pathunix.c:
./bootstrap/jam0 -f build.jam --toolset=sun --toolset-root=/opt/SUNWspro/ clean
...found 1 target...
...updating 1 target...
...updated 1 target...
./bootstrap/jam0 -f build.jam --toolset=sun --toolset-root=/opt/SUNWspro/
...found 160 targets...
...updating 2 targets...
[COMPILE] bin.solarisx86/b2
command.c:
compile.c:
constants.c:
debug.c:
debugger.c:
"debugger.c", line 2673: warning: statement not reached
execcmd.c:
frames.c:
function.c:
glob.c:
hash.c:
hcache.c:
headers.c:
hdrmacro.c:
jam.c:
jambase.c:
jamgram.c:
lists.c:
make.c:
make1.c:
mem.c:
object.c:
option.c:
output.c:
parse.c:
pathsys.c:
regexp.c:
rules.c:
scan.c:
search.c:
subst.c:
w32_getreg.c:
timestamp.c:
variable.c:
modules.c:
strings.c:
filesys.c:
builtins.c:
class.c:
cwd.c:
native.c:
md5.c:
modules/set.c:
modules/path.c:
modules/regex.c:
modules/property-set.c:
modules/sequence.c:
modules/order.c:
execunix.c:
fileunix.c:
pathunix.c:
Undefined                       first referenced
 symbol                             in file
clock_gettime                       timestamp.o
ld: fatal: symbol referencing errors. No output written to bin.solarisx86/b2

    "cc"   -o bin.solarisx86/b2 "-DNDEBUG" "-DOPT_HEADER_CACHE_EXT" "-DOPT_GRAPH_DEBUG_EXT" "-DOPT_SEMAPHORE" "-DOPT_AT_FILES" "-DOPT_DEBUG_PROFILE" "-DJAM_DEBUGGER" "-DOPT_FIX_TARGET_VARIABLES_EXT" "-DOPT_IMPROVED_PATIENCE_EXT" "-DYYSTACKSIZE=5000" "-s" "-xO3" "command.c" "compile.c" "constants.c" "debug.c" "debugger.c" "execcmd.c" "frames.c" "function.c" "glob.c" "hash.c" "hcache.c" "headers.c" "hdrmacro.c" "jam.c" "jambase.c" "jamgram.c" "lists.c" "make.c" "make1.c" "mem.c" "object.c" "option.c" "output.c" "parse.c" "pathsys.c" "regexp.c" "rules.c" "scan.c" "search.c" "subst.c" "w32_getreg.c" "timestamp.c" "variable.c" "modules.c" "strings.c" "filesys.c" "builtins.c" "class.c" "cwd.c" "native.c" "md5.c" "modules/set.c" "modules/path.c" "modules/regex.c" "modules/property-set.c" "modules/sequence.c" "modules/order.c" "execunix.c" "fileunix.c" "pathunix.c"

...failed [COMPILE] bin.solarisx86/b2...
...skipped bjam for lack of b2...
...failed updating 1 target...
...skipped 1 target...
$



On Fri, Nov 29, 2019 at 5:07 PM Piotr Kowalski <[hidden email]> wrote:
Hi Kamal
From what I can see, earlier versions of bootstrap did not use clock_gettime function and that made them link correctly.
This function on Solaris requires linking with -lrt

Since you are doing this only for yourself you can edit build.sh script and add -lrt at the end of line 350:
echo_run ${BOOST_JAM_CC} ${BOOST_JAM_OPT_JAM} ${BJAM_SOURCES} -lrt

If that helps, boost team may need to fix build.sh to add -lrt if building on Solaris platform

pt., 29 lis 2019 o 08:44 kamallochan Jena <[hidden email]> napisał(a):
Hi All,

In SunOS, even I am getting below errors which has been reported before by some one and is discussed in "https://github.com/boostorg/thread/issues/283 with Fix.

Error:
./boost/thread/pthread/thread_data.hpp:60:5: error: missing binary operator before token "_sysconf"
 #if PTHREAD_STACK_MIN > 0

If Yes, From where the latest boost kit can be downloaded with above fix ??
Is the above fix, also resolve the previous syntax error "./build.sh: syntax error at line 143: `machine=$' unexpected " ??

Kindly confirm!!!

Regards,
Kamal
 

On Fri, Nov 29, 2019 at 12:52 PM kamallochan Jena <[hidden email]> wrote:
Hi All,

FYI, 
bootstarp.sh from  boost_1_56_0 working fine in same SunOS, where boost_1_70_0 is causing the problem.

Thanks,
Kamal

On Fri, Nov 29, 2019 at 10:54 AM kamallochan Jena <[hidden email]> wrote:
Hi Piotr and David, 
    Thank you for your response.

Have modified the build.sh as mentioned, and for all below cases build.sh is failing with Error:  ld: fatal: symbol referencing errors. No output written to bootstrap/jam0

Case 1>     #!/bin/sh   --->  #!/bin/bash
Case 2>     machine=$(gcc -dumpmachine 2>/dev/null)   ---> machine=`gcc -dumpmachine 2>/dev/null`
Case 3>     machine=$(gcc -dumpmachine 2>/dev/null)   --->  machine=` echo $(gcc -dumpmachine 2>/dev/null) `
   
FYI, default shell of SunOS is /bin/sh
        $ echo $SHELL
        /bin/sh

Details:
  $ ./bootstrap.sh
      -n Bootstrapping the build engine with toolset sun...

      Failed to bootstrap the build engine
      Consult 'bootstrap.log' for more details

  $ cat bootstrap.log
     ###
     ### Using 'sun' toolset.
     ###
     rm -rf bootstrap
     mkdir bootstrap
     cc -o bootstrap/jam0 command.c compile.c constants.c debug.c execcmd.c frames.c function.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c pathsys.c regexp.c rules.c scan.c search.c subst.c timestamp.c        variable.c modules.c strings.c filesys.c builtins.c class.c cwd.c native.c md5.c w32_getreg.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c execunix.c fileunix.c pathunix.c
      command.c:
      compile.c:
      constants.c:
      debug.c:
      execcmd.c:
      frames.c:
      function.c:
      glob.c:
      hash.c:
      hdrmacro.c:
      headers.c:
      jam.c:
      jambase.c:
      jamgram.c:
      lists.c:
      make.c:
      make1.c:
      object.c:
      option.c:
      output.c:
      parse.c:
      pathsys.c:
      regexp.c:
      rules.c:
      scan.c:  search.c:
      subst.c:
      timestamp.c:
      variable.c:
      modules.c:
      strings.c:
      filesys.c:
      builtins.c:
      class.c:
      cwd.c:
      native.c:
      md5.c:
      w32_getreg.c:
      modules/set.c:
      modules/path.c:
      modules/regex.c:
      modules/property-set.c:
      modules/sequence.c:
      modules/order.c:
      execunix.c:
      fileunix.c:
      pathunix.c:
      Undefined                       first referenced
      symbol                             in file
      clock_gettime                       timestamp.o
      ld: fatal: symbol referencing errors. No output written to bootstrap/jam0
      bash-3.2$

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

On Thu, Nov 28, 2019 at 7:48 PM Piotr Kowalski via Boost-users <[hidden email]> wrote:
I guess SunOS uses System V specification which is older than POSIX and only supports `` syntax. If you look at autotools they never generate $() to make sure it wil work everywhere even on older /bin/sh

czw., 28 lis 2019 o 14:33 David Demelier via Boost-users <[hidden email]> napisał(a):
Le 28/11/2019 à 12:22, Piotr Kowalski via Boost-users a écrit :
> build.sh is intended for /bin/sh but uses bash-specific syntax $(command)

$() is part of POSIX though so I suppose the SunOS default shell isn't
POSIX compliant or too old.

Regards,

--
David
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: [Urgent] ./bootstrap.sh from boost_1_70_0 is failing in SunOS

Boost - Users mailing list
Continued to above mail: 

>> earlier versions of bootstrap did not use clock_gettime function and that made them link correctly.
Could you please update, in which version of boost the clock_gettime function introduced.

Thanks & Regards,
Kamal

On Sun, Dec 1, 2019 at 10:42 AM kamallochan Jena <[hidden email]> wrote:

Hi Piotr,

Thank you for your support and update on this issue!!!

As you suggested, I updated build.sh script and add -lrt at the end of line 350, but still facing the same error.
                             echo_run ${BOOST_JAM_CC} ${BOOST_JAM_OPT_JAM} ${BJAM_SOURCES} -lrt

Here is the details of Log: ----------------

$ ./bootstrap.sh
-n Bootstrapping the build engine with toolset sun...

Failed to bootstrap the build engine
Consult 'bootstrap.log' for more details

$ cat bootstrap.log
###
### Using 'sun' toolset.
###
rm -rf bootstrap
mkdir bootstrap
cc -o bootstrap/jam0 command.c compile.c constants.c debug.c execcmd.c frames.c function.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c pathsys.c regexp.c rules.c scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c class.c cwd.c native.c md5.c w32_getreg.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c execunix.c fileunix.c pathunix.c -lrt
command.c:
compile.c:
constants.c:
debug.c:
execcmd.c:
frames.c:
function.c:
glob.c:
hash.c:
hdrmacro.c:
headers.c:
jam.c:
jambase.c:
jamgram.c:
lists.c:
make.c:
make1.c:
object.c:
option.c:
output.c:
parse.c:
pathsys.c:
regexp.c:
rules.c:
scan.c:
search.c:
subst.c:
timestamp.c:
variable.c:
modules.c:
strings.c:
filesys.c:
builtins.c:
class.c:
cwd.c:
native.c:
md5.c:
w32_getreg.c:
modules/set.c:
modules/path.c:
modules/regex.c:
modules/property-set.c:
modules/sequence.c:
modules/order.c:
execunix.c:
fileunix.c:
pathunix.c:
./bootstrap/jam0 -f build.jam --toolset=sun --toolset-root=/opt/SUNWspro/ clean
...found 1 target...
...updating 1 target...
...updated 1 target...
./bootstrap/jam0 -f build.jam --toolset=sun --toolset-root=/opt/SUNWspro/
...found 160 targets...
...updating 2 targets...
[COMPILE] bin.solarisx86/b2
command.c:
compile.c:
constants.c:
debug.c:
debugger.c:
"debugger.c", line 2673: warning: statement not reached
execcmd.c:
frames.c:
function.c:
glob.c:
hash.c:
hcache.c:
headers.c:
hdrmacro.c:
jam.c:
jambase.c:
jamgram.c:
lists.c:
make.c:
make1.c:
mem.c:
object.c:
option.c:
output.c:
parse.c:
pathsys.c:
regexp.c:
rules.c:
scan.c:
search.c:
subst.c:
w32_getreg.c:
timestamp.c:
variable.c:
modules.c:
strings.c:
filesys.c:
builtins.c:
class.c:
cwd.c:
native.c:
md5.c:
modules/set.c:
modules/path.c:
modules/regex.c:
modules/property-set.c:
modules/sequence.c:
modules/order.c:
execunix.c:
fileunix.c:
pathunix.c:
Undefined                       first referenced
 symbol                             in file
clock_gettime                       timestamp.o
ld: fatal: symbol referencing errors. No output written to bin.solarisx86/b2

    "cc"   -o bin.solarisx86/b2 "-DNDEBUG" "-DOPT_HEADER_CACHE_EXT" "-DOPT_GRAPH_DEBUG_EXT" "-DOPT_SEMAPHORE" "-DOPT_AT_FILES" "-DOPT_DEBUG_PROFILE" "-DJAM_DEBUGGER" "-DOPT_FIX_TARGET_VARIABLES_EXT" "-DOPT_IMPROVED_PATIENCE_EXT" "-DYYSTACKSIZE=5000" "-s" "-xO3" "command.c" "compile.c" "constants.c" "debug.c" "debugger.c" "execcmd.c" "frames.c" "function.c" "glob.c" "hash.c" "hcache.c" "headers.c" "hdrmacro.c" "jam.c" "jambase.c" "jamgram.c" "lists.c" "make.c" "make1.c" "mem.c" "object.c" "option.c" "output.c" "parse.c" "pathsys.c" "regexp.c" "rules.c" "scan.c" "search.c" "subst.c" "w32_getreg.c" "timestamp.c" "variable.c" "modules.c" "strings.c" "filesys.c" "builtins.c" "class.c" "cwd.c" "native.c" "md5.c" "modules/set.c" "modules/path.c" "modules/regex.c" "modules/property-set.c" "modules/sequence.c" "modules/order.c" "execunix.c" "fileunix.c" "pathunix.c"

...failed [COMPILE] bin.solarisx86/b2...
...skipped bjam for lack of b2...
...failed updating 1 target...
...skipped 1 target...
$



On Fri, Nov 29, 2019 at 5:07 PM Piotr Kowalski <[hidden email]> wrote:
Hi Kamal
From what I can see, earlier versions of bootstrap did not use clock_gettime function and that made them link correctly.
This function on Solaris requires linking with -lrt

Since you are doing this only for yourself you can edit build.sh script and add -lrt at the end of line 350:
echo_run ${BOOST_JAM_CC} ${BOOST_JAM_OPT_JAM} ${BJAM_SOURCES} -lrt

If that helps, boost team may need to fix build.sh to add -lrt if building on Solaris platform

pt., 29 lis 2019 o 08:44 kamallochan Jena <[hidden email]> napisał(a):
Hi All,

In SunOS, even I am getting below errors which has been reported before by some one and is discussed in "https://github.com/boostorg/thread/issues/283 with Fix.

Error:
./boost/thread/pthread/thread_data.hpp:60:5: error: missing binary operator before token "_sysconf"
 #if PTHREAD_STACK_MIN > 0

If Yes, From where the latest boost kit can be downloaded with above fix ??
Is the above fix, also resolve the previous syntax error "./build.sh: syntax error at line 143: `machine=$' unexpected " ??

Kindly confirm!!!

Regards,
Kamal
 

On Fri, Nov 29, 2019 at 12:52 PM kamallochan Jena <[hidden email]> wrote:
Hi All,

FYI, 
bootstarp.sh from  boost_1_56_0 working fine in same SunOS, where boost_1_70_0 is causing the problem.

Thanks,
Kamal

On Fri, Nov 29, 2019 at 10:54 AM kamallochan Jena <[hidden email]> wrote:
Hi Piotr and David, 
    Thank you for your response.

Have modified the build.sh as mentioned, and for all below cases build.sh is failing with Error:  ld: fatal: symbol referencing errors. No output written to bootstrap/jam0

Case 1>     #!/bin/sh   --->  #!/bin/bash
Case 2>     machine=$(gcc -dumpmachine 2>/dev/null)   ---> machine=`gcc -dumpmachine 2>/dev/null`
Case 3>     machine=$(gcc -dumpmachine 2>/dev/null)   --->  machine=` echo $(gcc -dumpmachine 2>/dev/null) `
   
FYI, default shell of SunOS is /bin/sh
        $ echo $SHELL
        /bin/sh

Details:
  $ ./bootstrap.sh
      -n Bootstrapping the build engine with toolset sun...

      Failed to bootstrap the build engine
      Consult 'bootstrap.log' for more details

  $ cat bootstrap.log
     ###
     ### Using 'sun' toolset.
     ###
     rm -rf bootstrap
     mkdir bootstrap
     cc -o bootstrap/jam0 command.c compile.c constants.c debug.c execcmd.c frames.c function.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c pathsys.c regexp.c rules.c scan.c search.c subst.c timestamp.c        variable.c modules.c strings.c filesys.c builtins.c class.c cwd.c native.c md5.c w32_getreg.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c execunix.c fileunix.c pathunix.c
      command.c:
      compile.c:
      constants.c:
      debug.c:
      execcmd.c:
      frames.c:
      function.c:
      glob.c:
      hash.c:
      hdrmacro.c:
      headers.c:
      jam.c:
      jambase.c:
      jamgram.c:
      lists.c:
      make.c:
      make1.c:
      object.c:
      option.c:
      output.c:
      parse.c:
      pathsys.c:
      regexp.c:
      rules.c:
      scan.c:  search.c:
      subst.c:
      timestamp.c:
      variable.c:
      modules.c:
      strings.c:
      filesys.c:
      builtins.c:
      class.c:
      cwd.c:
      native.c:
      md5.c:
      w32_getreg.c:
      modules/set.c:
      modules/path.c:
      modules/regex.c:
      modules/property-set.c:
      modules/sequence.c:
      modules/order.c:
      execunix.c:
      fileunix.c:
      pathunix.c:
      Undefined                       first referenced
      symbol                             in file
      clock_gettime                       timestamp.o
      ld: fatal: symbol referencing errors. No output written to bootstrap/jam0
      bash-3.2$

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

On Thu, Nov 28, 2019 at 7:48 PM Piotr Kowalski via Boost-users <[hidden email]> wrote:
I guess SunOS uses System V specification which is older than POSIX and only supports `` syntax. If you look at autotools they never generate $() to make sure it wil work everywhere even on older /bin/sh

czw., 28 lis 2019 o 14:33 David Demelier via Boost-users <[hidden email]> napisał(a):
Le 28/11/2019 à 12:22, Piotr Kowalski via Boost-users a écrit :
> build.sh is intended for /bin/sh but uses bash-specific syntax $(command)

$() is part of POSIX though so I suppose the SunOS default shell isn't
POSIX compliant or too old.

Regards,

--
David
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: [Urgent] ./bootstrap.sh from boost_1_70_0 is failing in SunOS

Boost - Users mailing list
It seems that build.sh linked bjam correctly but then it does the bootstrapping using bjam itself.
That process is controlled from build.jam file inside src/engine directory.
I am not an expert on jam files but I would suggest to add -lrt to the --libs variable, i.e. line 469
--libs = $(tool.$(toolset).linklibs) ; should become --libs = $(tool.$(toolset).linklibs) -lrt ;



niedz., 1 gru 2019 o 06:18 kamallochan Jena <[hidden email]> napisał(a):
Continued to above mail: 

>> earlier versions of bootstrap did not use clock_gettime function and that made them link correctly.
Could you please update, in which version of boost the clock_gettime function introduced.

Thanks & Regards,
Kamal

On Sun, Dec 1, 2019 at 10:42 AM kamallochan Jena <[hidden email]> wrote:

Hi Piotr,

Thank you for your support and update on this issue!!!

As you suggested, I updated build.sh script and add -lrt at the end of line 350, but still facing the same error.
                             echo_run ${BOOST_JAM_CC} ${BOOST_JAM_OPT_JAM} ${BJAM_SOURCES} -lrt

Here is the details of Log: ----------------

$ ./bootstrap.sh
-n Bootstrapping the build engine with toolset sun...

Failed to bootstrap the build engine
Consult 'bootstrap.log' for more details

$ cat bootstrap.log
###
### Using 'sun' toolset.
###
rm -rf bootstrap
mkdir bootstrap
cc -o bootstrap/jam0 command.c compile.c constants.c debug.c execcmd.c frames.c function.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c pathsys.c regexp.c rules.c scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c class.c cwd.c native.c md5.c w32_getreg.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c execunix.c fileunix.c pathunix.c -lrt
command.c:
compile.c:
constants.c:
debug.c:
execcmd.c:
frames.c:
function.c:
glob.c:
hash.c:
hdrmacro.c:
headers.c:
jam.c:
jambase.c:
jamgram.c:
lists.c:
make.c:
make1.c:
object.c:
option.c:
output.c:
parse.c:
pathsys.c:
regexp.c:
rules.c:
scan.c:
search.c:
subst.c:
timestamp.c:
variable.c:
modules.c:
strings.c:
filesys.c:
builtins.c:
class.c:
cwd.c:
native.c:
md5.c:
w32_getreg.c:
modules/set.c:
modules/path.c:
modules/regex.c:
modules/property-set.c:
modules/sequence.c:
modules/order.c:
execunix.c:
fileunix.c:
pathunix.c:
./bootstrap/jam0 -f build.jam --toolset=sun --toolset-root=/opt/SUNWspro/ clean
...found 1 target...
...updating 1 target...
...updated 1 target...
./bootstrap/jam0 -f build.jam --toolset=sun --toolset-root=/opt/SUNWspro/
...found 160 targets...
...updating 2 targets...
[COMPILE] bin.solarisx86/b2
command.c:
compile.c:
constants.c:
debug.c:
debugger.c:
"debugger.c", line 2673: warning: statement not reached
execcmd.c:
frames.c:
function.c:
glob.c:
hash.c:
hcache.c:
headers.c:
hdrmacro.c:
jam.c:
jambase.c:
jamgram.c:
lists.c:
make.c:
make1.c:
mem.c:
object.c:
option.c:
output.c:
parse.c:
pathsys.c:
regexp.c:
rules.c:
scan.c:
search.c:
subst.c:
w32_getreg.c:
timestamp.c:
variable.c:
modules.c:
strings.c:
filesys.c:
builtins.c:
class.c:
cwd.c:
native.c:
md5.c:
modules/set.c:
modules/path.c:
modules/regex.c:
modules/property-set.c:
modules/sequence.c:
modules/order.c:
execunix.c:
fileunix.c:
pathunix.c:
Undefined                       first referenced
 symbol                             in file
clock_gettime                       timestamp.o
ld: fatal: symbol referencing errors. No output written to bin.solarisx86/b2

    "cc"   -o bin.solarisx86/b2 "-DNDEBUG" "-DOPT_HEADER_CACHE_EXT" "-DOPT_GRAPH_DEBUG_EXT" "-DOPT_SEMAPHORE" "-DOPT_AT_FILES" "-DOPT_DEBUG_PROFILE" "-DJAM_DEBUGGER" "-DOPT_FIX_TARGET_VARIABLES_EXT" "-DOPT_IMPROVED_PATIENCE_EXT" "-DYYSTACKSIZE=5000" "-s" "-xO3" "command.c" "compile.c" "constants.c" "debug.c" "debugger.c" "execcmd.c" "frames.c" "function.c" "glob.c" "hash.c" "hcache.c" "headers.c" "hdrmacro.c" "jam.c" "jambase.c" "jamgram.c" "lists.c" "make.c" "make1.c" "mem.c" "object.c" "option.c" "output.c" "parse.c" "pathsys.c" "regexp.c" "rules.c" "scan.c" "search.c" "subst.c" "w32_getreg.c" "timestamp.c" "variable.c" "modules.c" "strings.c" "filesys.c" "builtins.c" "class.c" "cwd.c" "native.c" "md5.c" "modules/set.c" "modules/path.c" "modules/regex.c" "modules/property-set.c" "modules/sequence.c" "modules/order.c" "execunix.c" "fileunix.c" "pathunix.c"

...failed [COMPILE] bin.solarisx86/b2...
...skipped bjam for lack of b2...
...failed updating 1 target...
...skipped 1 target...
$



On Fri, Nov 29, 2019 at 5:07 PM Piotr Kowalski <[hidden email]> wrote:
Hi Kamal
From what I can see, earlier versions of bootstrap did not use clock_gettime function and that made them link correctly.
This function on Solaris requires linking with -lrt

Since you are doing this only for yourself you can edit build.sh script and add -lrt at the end of line 350:
echo_run ${BOOST_JAM_CC} ${BOOST_JAM_OPT_JAM} ${BJAM_SOURCES} -lrt

If that helps, boost team may need to fix build.sh to add -lrt if building on Solaris platform

pt., 29 lis 2019 o 08:44 kamallochan Jena <[hidden email]> napisał(a):
Hi All,

In SunOS, even I am getting below errors which has been reported before by some one and is discussed in "https://github.com/boostorg/thread/issues/283 with Fix.

Error:
./boost/thread/pthread/thread_data.hpp:60:5: error: missing binary operator before token "_sysconf"
 #if PTHREAD_STACK_MIN > 0

If Yes, From where the latest boost kit can be downloaded with above fix ??
Is the above fix, also resolve the previous syntax error "./build.sh: syntax error at line 143: `machine=$' unexpected " ??

Kindly confirm!!!

Regards,
Kamal
 

On Fri, Nov 29, 2019 at 12:52 PM kamallochan Jena <[hidden email]> wrote:
Hi All,

FYI, 
bootstarp.sh from  boost_1_56_0 working fine in same SunOS, where boost_1_70_0 is causing the problem.

Thanks,
Kamal

On Fri, Nov 29, 2019 at 10:54 AM kamallochan Jena <[hidden email]> wrote:
Hi Piotr and David, 
    Thank you for your response.

Have modified the build.sh as mentioned, and for all below cases build.sh is failing with Error:  ld: fatal: symbol referencing errors. No output written to bootstrap/jam0

Case 1>     #!/bin/sh   --->  #!/bin/bash
Case 2>     machine=$(gcc -dumpmachine 2>/dev/null)   ---> machine=`gcc -dumpmachine 2>/dev/null`
Case 3>     machine=$(gcc -dumpmachine 2>/dev/null)   --->  machine=` echo $(gcc -dumpmachine 2>/dev/null) `
   
FYI, default shell of SunOS is /bin/sh
        $ echo $SHELL
        /bin/sh

Details:
  $ ./bootstrap.sh
      -n Bootstrapping the build engine with toolset sun...

      Failed to bootstrap the build engine
      Consult 'bootstrap.log' for more details

  $ cat bootstrap.log
     ###
     ### Using 'sun' toolset.
     ###
     rm -rf bootstrap
     mkdir bootstrap
     cc -o bootstrap/jam0 command.c compile.c constants.c debug.c execcmd.c frames.c function.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c pathsys.c regexp.c rules.c scan.c search.c subst.c timestamp.c        variable.c modules.c strings.c filesys.c builtins.c class.c cwd.c native.c md5.c w32_getreg.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c execunix.c fileunix.c pathunix.c
      command.c:
      compile.c:
      constants.c:
      debug.c:
      execcmd.c:
      frames.c:
      function.c:
      glob.c:
      hash.c:
      hdrmacro.c:
      headers.c:
      jam.c:
      jambase.c:
      jamgram.c:
      lists.c:
      make.c:
      make1.c:
      object.c:
      option.c:
      output.c:
      parse.c:
      pathsys.c:
      regexp.c:
      rules.c:
      scan.c:  search.c:
      subst.c:
      timestamp.c:
      variable.c:
      modules.c:
      strings.c:
      filesys.c:
      builtins.c:
      class.c:
      cwd.c:
      native.c:
      md5.c:
      w32_getreg.c:
      modules/set.c:
      modules/path.c:
      modules/regex.c:
      modules/property-set.c:
      modules/sequence.c:
      modules/order.c:
      execunix.c:
      fileunix.c:
      pathunix.c:
      Undefined                       first referenced
      symbol                             in file
      clock_gettime                       timestamp.o
      ld: fatal: symbol referencing errors. No output written to bootstrap/jam0
      bash-3.2$

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

On Thu, Nov 28, 2019 at 7:48 PM Piotr Kowalski via Boost-users <[hidden email]> wrote:
I guess SunOS uses System V specification which is older than POSIX and only supports `` syntax. If you look at autotools they never generate $() to make sure it wil work everywhere even on older /bin/sh

czw., 28 lis 2019 o 14:33 David Demelier via Boost-users <[hidden email]> napisał(a):
Le 28/11/2019 à 12:22, Piotr Kowalski via Boost-users a écrit :
> build.sh is intended for /bin/sh but uses bash-specific syntax $(command)

$() is part of POSIX though so I suppose the SunOS default shell isn't
POSIX compliant or too old.

Regards,

--
David
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: [Urgent] ./bootstrap.sh from boost_1_70_0 is failing in SunOS

Boost - Users mailing list
Hi Piotr,

The above changes also not fixing the issue. Getting same error.

Changes: 
      File: boost_1_70_0/tools/build/src/engine/build.jam
      Line no: 469
      Modified line to   --libs = $(tool.$(toolset).linklibs) -lrt ;

Error:
   pathunix.c:
   Undefined                       first referenced
   symbol                             in file
   clock_gettime                       timestamp.o
   ld: fatal: symbol referencing errors. No output written to bootstrap/jam0


Thanks & Regards,
Kamal

On Sun, Dec 1, 2019 at 8:29 PM Piotr Kowalski <[hidden email]> wrote:
It seems that build.sh linked bjam correctly but then it does the bootstrapping using bjam itself.
That process is controlled from build.jam file inside src/engine directory.
I am not an expert on jam files but I would suggest to add -lrt to the --libs variable, i.e. line 469
--libs = $(tool.$(toolset).linklibs) ; should become --libs = $(tool.$(toolset).linklibs) -lrt ;



niedz., 1 gru 2019 o 06:18 kamallochan Jena <[hidden email]> napisał(a):
Continued to above mail: 

>> earlier versions of bootstrap did not use clock_gettime function and that made them link correctly.
Could you please update, in which version of boost the clock_gettime function introduced.

Thanks & Regards,
Kamal

On Sun, Dec 1, 2019 at 10:42 AM kamallochan Jena <[hidden email]> wrote:

Hi Piotr,

Thank you for your support and update on this issue!!!

As you suggested, I updated build.sh script and add -lrt at the end of line 350, but still facing the same error.
                             echo_run ${BOOST_JAM_CC} ${BOOST_JAM_OPT_JAM} ${BJAM_SOURCES} -lrt

Here is the details of Log: ----------------

$ ./bootstrap.sh
-n Bootstrapping the build engine with toolset sun...

Failed to bootstrap the build engine
Consult 'bootstrap.log' for more details

$ cat bootstrap.log
###
### Using 'sun' toolset.
###
rm -rf bootstrap
mkdir bootstrap
cc -o bootstrap/jam0 command.c compile.c constants.c debug.c execcmd.c frames.c function.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c pathsys.c regexp.c rules.c scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c class.c cwd.c native.c md5.c w32_getreg.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c execunix.c fileunix.c pathunix.c -lrt
command.c:
compile.c:
constants.c:
debug.c:
execcmd.c:
frames.c:
function.c:
glob.c:
hash.c:
hdrmacro.c:
headers.c:
jam.c:
jambase.c:
jamgram.c:
lists.c:
make.c:
make1.c:
object.c:
option.c:
output.c:
parse.c:
pathsys.c:
regexp.c:
rules.c:
scan.c:
search.c:
subst.c:
timestamp.c:
variable.c:
modules.c:
strings.c:
filesys.c:
builtins.c:
class.c:
cwd.c:
native.c:
md5.c:
w32_getreg.c:
modules/set.c:
modules/path.c:
modules/regex.c:
modules/property-set.c:
modules/sequence.c:
modules/order.c:
execunix.c:
fileunix.c:
pathunix.c:
./bootstrap/jam0 -f build.jam --toolset=sun --toolset-root=/opt/SUNWspro/ clean
...found 1 target...
...updating 1 target...
...updated 1 target...
./bootstrap/jam0 -f build.jam --toolset=sun --toolset-root=/opt/SUNWspro/
...found 160 targets...
...updating 2 targets...
[COMPILE] bin.solarisx86/b2
command.c:
compile.c:
constants.c:
debug.c:
debugger.c:
"debugger.c", line 2673: warning: statement not reached
execcmd.c:
frames.c:
function.c:
glob.c:
hash.c:
hcache.c:
headers.c:
hdrmacro.c:
jam.c:
jambase.c:
jamgram.c:
lists.c:
make.c:
make1.c:
mem.c:
object.c:
option.c:
output.c:
parse.c:
pathsys.c:
regexp.c:
rules.c:
scan.c:
search.c:
subst.c:
w32_getreg.c:
timestamp.c:
variable.c:
modules.c:
strings.c:
filesys.c:
builtins.c:
class.c:
cwd.c:
native.c:
md5.c:
modules/set.c:
modules/path.c:
modules/regex.c:
modules/property-set.c:
modules/sequence.c:
modules/order.c:
execunix.c:
fileunix.c:
pathunix.c:
Undefined                       first referenced
 symbol                             in file
clock_gettime                       timestamp.o
ld: fatal: symbol referencing errors. No output written to bin.solarisx86/b2

    "cc"   -o bin.solarisx86/b2 "-DNDEBUG" "-DOPT_HEADER_CACHE_EXT" "-DOPT_GRAPH_DEBUG_EXT" "-DOPT_SEMAPHORE" "-DOPT_AT_FILES" "-DOPT_DEBUG_PROFILE" "-DJAM_DEBUGGER" "-DOPT_FIX_TARGET_VARIABLES_EXT" "-DOPT_IMPROVED_PATIENCE_EXT" "-DYYSTACKSIZE=5000" "-s" "-xO3" "command.c" "compile.c" "constants.c" "debug.c" "debugger.c" "execcmd.c" "frames.c" "function.c" "glob.c" "hash.c" "hcache.c" "headers.c" "hdrmacro.c" "jam.c" "jambase.c" "jamgram.c" "lists.c" "make.c" "make1.c" "mem.c" "object.c" "option.c" "output.c" "parse.c" "pathsys.c" "regexp.c" "rules.c" "scan.c" "search.c" "subst.c" "w32_getreg.c" "timestamp.c" "variable.c" "modules.c" "strings.c" "filesys.c" "builtins.c" "class.c" "cwd.c" "native.c" "md5.c" "modules/set.c" "modules/path.c" "modules/regex.c" "modules/property-set.c" "modules/sequence.c" "modules/order.c" "execunix.c" "fileunix.c" "pathunix.c"

...failed [COMPILE] bin.solarisx86/b2...
...skipped bjam for lack of b2...
...failed updating 1 target...
...skipped 1 target...
$



On Fri, Nov 29, 2019 at 5:07 PM Piotr Kowalski <[hidden email]> wrote:
Hi Kamal
From what I can see, earlier versions of bootstrap did not use clock_gettime function and that made them link correctly.
This function on Solaris requires linking with -lrt

Since you are doing this only for yourself you can edit build.sh script and add -lrt at the end of line 350:
echo_run ${BOOST_JAM_CC} ${BOOST_JAM_OPT_JAM} ${BJAM_SOURCES} -lrt

If that helps, boost team may need to fix build.sh to add -lrt if building on Solaris platform

pt., 29 lis 2019 o 08:44 kamallochan Jena <[hidden email]> napisał(a):
Hi All,

In SunOS, even I am getting below errors which has been reported before by some one and is discussed in "https://github.com/boostorg/thread/issues/283 with Fix.

Error:
./boost/thread/pthread/thread_data.hpp:60:5: error: missing binary operator before token "_sysconf"
 #if PTHREAD_STACK_MIN > 0

If Yes, From where the latest boost kit can be downloaded with above fix ??
Is the above fix, also resolve the previous syntax error "./build.sh: syntax error at line 143: `machine=$' unexpected " ??

Kindly confirm!!!

Regards,
Kamal
 

On Fri, Nov 29, 2019 at 12:52 PM kamallochan Jena <[hidden email]> wrote:
Hi All,

FYI, 
bootstarp.sh from  boost_1_56_0 working fine in same SunOS, where boost_1_70_0 is causing the problem.

Thanks,
Kamal

On Fri, Nov 29, 2019 at 10:54 AM kamallochan Jena <[hidden email]> wrote:
Hi Piotr and David, 
    Thank you for your response.

Have modified the build.sh as mentioned, and for all below cases build.sh is failing with Error:  ld: fatal: symbol referencing errors. No output written to bootstrap/jam0

Case 1>     #!/bin/sh   --->  #!/bin/bash
Case 2>     machine=$(gcc -dumpmachine 2>/dev/null)   ---> machine=`gcc -dumpmachine 2>/dev/null`
Case 3>     machine=$(gcc -dumpmachine 2>/dev/null)   --->  machine=` echo $(gcc -dumpmachine 2>/dev/null) `
   
FYI, default shell of SunOS is /bin/sh
        $ echo $SHELL
        /bin/sh

Details:
  $ ./bootstrap.sh
      -n Bootstrapping the build engine with toolset sun...

      Failed to bootstrap the build engine
      Consult 'bootstrap.log' for more details

  $ cat bootstrap.log
     ###
     ### Using 'sun' toolset.
     ###
     rm -rf bootstrap
     mkdir bootstrap
     cc -o bootstrap/jam0 command.c compile.c constants.c debug.c execcmd.c frames.c function.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c pathsys.c regexp.c rules.c scan.c search.c subst.c timestamp.c        variable.c modules.c strings.c filesys.c builtins.c class.c cwd.c native.c md5.c w32_getreg.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c execunix.c fileunix.c pathunix.c
      command.c:
      compile.c:
      constants.c:
      debug.c:
      execcmd.c:
      frames.c:
      function.c:
      glob.c:
      hash.c:
      hdrmacro.c:
      headers.c:
      jam.c:
      jambase.c:
      jamgram.c:
      lists.c:
      make.c:
      make1.c:
      object.c:
      option.c:
      output.c:
      parse.c:
      pathsys.c:
      regexp.c:
      rules.c:
      scan.c:  search.c:
      subst.c:
      timestamp.c:
      variable.c:
      modules.c:
      strings.c:
      filesys.c:
      builtins.c:
      class.c:
      cwd.c:
      native.c:
      md5.c:
      w32_getreg.c:
      modules/set.c:
      modules/path.c:
      modules/regex.c:
      modules/property-set.c:
      modules/sequence.c:
      modules/order.c:
      execunix.c:
      fileunix.c:
      pathunix.c:
      Undefined                       first referenced
      symbol                             in file
      clock_gettime                       timestamp.o
      ld: fatal: symbol referencing errors. No output written to bootstrap/jam0
      bash-3.2$

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

On Thu, Nov 28, 2019 at 7:48 PM Piotr Kowalski via Boost-users <[hidden email]> wrote:
I guess SunOS uses System V specification which is older than POSIX and only supports `` syntax. If you look at autotools they never generate $() to make sure it wil work everywhere even on older /bin/sh

czw., 28 lis 2019 o 14:33 David Demelier via Boost-users <[hidden email]> napisał(a):
Le 28/11/2019 à 12:22, Piotr Kowalski via Boost-users a écrit :
> build.sh is intended for /bin/sh but uses bash-specific syntax $(command)

$() is part of POSIX though so I suppose the SunOS default shell isn't
POSIX compliant or too old.

Regards,

--
David
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: [Urgent] ./bootstrap.sh from boost_1_70_0 is failing in SunOS

Boost - Users mailing list
Hi All,

FYI: With my changes below error, has been fixed in SunOS. 
 
  Error:
 ./boost/thread/pthread/thread_data.hpp:60:5: error: missing binary operator before token "_sysconf"
 #if PTHREAD_STACK_MIN > 0
However waiting for your suggestion to fix below error observed in SunOS: 

     $ ./bootstrap.sh
       -n Bootstrapping the build engine with toolset sun...

       Failed to bootstrap the build engine
       Consult 'bootstrap.log' for more details  

   Error:
      pathunix.c:
      Undefined                       first referenced
      symbol                             in file
      clock_gettime                       timestamp.o
      ld: fatal: symbol referencing errors. No output written to bootstrap/jam0

Your advice or suggestions will be much appreciated!!!

Regards,
Kamal

On Mon, Dec 2, 2019 at 3:51 PM kamallochan Jena <[hidden email]> wrote:
Hi Piotr,

The above changes also not fixing the issue. Getting same error.

Changes: 
      File: boost_1_70_0/tools/build/src/engine/build.jam
      Line no: 469
      Modified line to   --libs = $(tool.$(toolset).linklibs) -lrt ;

Error:
   pathunix.c:
   Undefined                       first referenced
   symbol                             in file
   clock_gettime                       timestamp.o
   ld: fatal: symbol referencing errors. No output written to bootstrap/jam0


Thanks & Regards,
Kamal

On Sun, Dec 1, 2019 at 8:29 PM Piotr Kowalski <[hidden email]> wrote:
It seems that build.sh linked bjam correctly but then it does the bootstrapping using bjam itself.
That process is controlled from build.jam file inside src/engine directory.
I am not an expert on jam files but I would suggest to add -lrt to the --libs variable, i.e. line 469
--libs = $(tool.$(toolset).linklibs) ; should become --libs = $(tool.$(toolset).linklibs) -lrt ;



niedz., 1 gru 2019 o 06:18 kamallochan Jena <[hidden email]> napisał(a):
Continued to above mail: 

>> earlier versions of bootstrap did not use clock_gettime function and that made them link correctly.
Could you please update, in which version of boost the clock_gettime function introduced.

Thanks & Regards,
Kamal

On Sun, Dec 1, 2019 at 10:42 AM kamallochan Jena <[hidden email]> wrote:

Hi Piotr,

Thank you for your support and update on this issue!!!

As you suggested, I updated build.sh script and add -lrt at the end of line 350, but still facing the same error.
                             echo_run ${BOOST_JAM_CC} ${BOOST_JAM_OPT_JAM} ${BJAM_SOURCES} -lrt

Here is the details of Log: ----------------

$ ./bootstrap.sh
-n Bootstrapping the build engine with toolset sun...

Failed to bootstrap the build engine
Consult 'bootstrap.log' for more details

$ cat bootstrap.log
###
### Using 'sun' toolset.
###
rm -rf bootstrap
mkdir bootstrap
cc -o bootstrap/jam0 command.c compile.c constants.c debug.c execcmd.c frames.c function.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c pathsys.c regexp.c rules.c scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c class.c cwd.c native.c md5.c w32_getreg.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c execunix.c fileunix.c pathunix.c -lrt
command.c:
compile.c:
constants.c:
debug.c:
execcmd.c:
frames.c:
function.c:
glob.c:
hash.c:
hdrmacro.c:
headers.c:
jam.c:
jambase.c:
jamgram.c:
lists.c:
make.c:
make1.c:
object.c:
option.c:
output.c:
parse.c:
pathsys.c:
regexp.c:
rules.c:
scan.c:
search.c:
subst.c:
timestamp.c:
variable.c:
modules.c:
strings.c:
filesys.c:
builtins.c:
class.c:
cwd.c:
native.c:
md5.c:
w32_getreg.c:
modules/set.c:
modules/path.c:
modules/regex.c:
modules/property-set.c:
modules/sequence.c:
modules/order.c:
execunix.c:
fileunix.c:
pathunix.c:
./bootstrap/jam0 -f build.jam --toolset=sun --toolset-root=/opt/SUNWspro/ clean
...found 1 target...
...updating 1 target...
...updated 1 target...
./bootstrap/jam0 -f build.jam --toolset=sun --toolset-root=/opt/SUNWspro/
...found 160 targets...
...updating 2 targets...
[COMPILE] bin.solarisx86/b2
command.c:
compile.c:
constants.c:
debug.c:
debugger.c:
"debugger.c", line 2673: warning: statement not reached
execcmd.c:
frames.c:
function.c:
glob.c:
hash.c:
hcache.c:
headers.c:
hdrmacro.c:
jam.c:
jambase.c:
jamgram.c:
lists.c:
make.c:
make1.c:
mem.c:
object.c:
option.c:
output.c:
parse.c:
pathsys.c:
regexp.c:
rules.c:
scan.c:
search.c:
subst.c:
w32_getreg.c:
timestamp.c:
variable.c:
modules.c:
strings.c:
filesys.c:
builtins.c:
class.c:
cwd.c:
native.c:
md5.c:
modules/set.c:
modules/path.c:
modules/regex.c:
modules/property-set.c:
modules/sequence.c:
modules/order.c:
execunix.c:
fileunix.c:
pathunix.c:
Undefined                       first referenced
 symbol                             in file
clock_gettime                       timestamp.o
ld: fatal: symbol referencing errors. No output written to bin.solarisx86/b2

    "cc"   -o bin.solarisx86/b2 "-DNDEBUG" "-DOPT_HEADER_CACHE_EXT" "-DOPT_GRAPH_DEBUG_EXT" "-DOPT_SEMAPHORE" "-DOPT_AT_FILES" "-DOPT_DEBUG_PROFILE" "-DJAM_DEBUGGER" "-DOPT_FIX_TARGET_VARIABLES_EXT" "-DOPT_IMPROVED_PATIENCE_EXT" "-DYYSTACKSIZE=5000" "-s" "-xO3" "command.c" "compile.c" "constants.c" "debug.c" "debugger.c" "execcmd.c" "frames.c" "function.c" "glob.c" "hash.c" "hcache.c" "headers.c" "hdrmacro.c" "jam.c" "jambase.c" "jamgram.c" "lists.c" "make.c" "make1.c" "mem.c" "object.c" "option.c" "output.c" "parse.c" "pathsys.c" "regexp.c" "rules.c" "scan.c" "search.c" "subst.c" "w32_getreg.c" "timestamp.c" "variable.c" "modules.c" "strings.c" "filesys.c" "builtins.c" "class.c" "cwd.c" "native.c" "md5.c" "modules/set.c" "modules/path.c" "modules/regex.c" "modules/property-set.c" "modules/sequence.c" "modules/order.c" "execunix.c" "fileunix.c" "pathunix.c"

...failed [COMPILE] bin.solarisx86/b2...
...skipped bjam for lack of b2...
...failed updating 1 target...
...skipped 1 target...
$



On Fri, Nov 29, 2019 at 5:07 PM Piotr Kowalski <[hidden email]> wrote:
Hi Kamal
From what I can see, earlier versions of bootstrap did not use clock_gettime function and that made them link correctly.
This function on Solaris requires linking with -lrt

Since you are doing this only for yourself you can edit build.sh script and add -lrt at the end of line 350:
echo_run ${BOOST_JAM_CC} ${BOOST_JAM_OPT_JAM} ${BJAM_SOURCES} -lrt

If that helps, boost team may need to fix build.sh to add -lrt if building on Solaris platform

pt., 29 lis 2019 o 08:44 kamallochan Jena <[hidden email]> napisał(a):
Hi All,

In SunOS, even I am getting below errors which has been reported before by some one and is discussed in "https://github.com/boostorg/thread/issues/283 with Fix.

Error:
./boost/thread/pthread/thread_data.hpp:60:5: error: missing binary operator before token "_sysconf"
 #if PTHREAD_STACK_MIN > 0

If Yes, From where the latest boost kit can be downloaded with above fix ??
Is the above fix, also resolve the previous syntax error "./build.sh: syntax error at line 143: `machine=$' unexpected " ??

Kindly confirm!!!

Regards,
Kamal
 

On Fri, Nov 29, 2019 at 12:52 PM kamallochan Jena <[hidden email]> wrote:
Hi All,

FYI, 
bootstarp.sh from  boost_1_56_0 working fine in same SunOS, where boost_1_70_0 is causing the problem.

Thanks,
Kamal

On Fri, Nov 29, 2019 at 10:54 AM kamallochan Jena <[hidden email]> wrote:
Hi Piotr and David, 
    Thank you for your response.

Have modified the build.sh as mentioned, and for all below cases build.sh is failing with Error:  ld: fatal: symbol referencing errors. No output written to bootstrap/jam0

Case 1>     #!/bin/sh   --->  #!/bin/bash
Case 2>     machine=$(gcc -dumpmachine 2>/dev/null)   ---> machine=`gcc -dumpmachine 2>/dev/null`
Case 3>     machine=$(gcc -dumpmachine 2>/dev/null)   --->  machine=` echo $(gcc -dumpmachine 2>/dev/null) `
   
FYI, default shell of SunOS is /bin/sh
        $ echo $SHELL
        /bin/sh

Details:
  $ ./bootstrap.sh
      -n Bootstrapping the build engine with toolset sun...

      Failed to bootstrap the build engine
      Consult 'bootstrap.log' for more details

  $ cat bootstrap.log
     ###
     ### Using 'sun' toolset.
     ###
     rm -rf bootstrap
     mkdir bootstrap
     cc -o bootstrap/jam0 command.c compile.c constants.c debug.c execcmd.c frames.c function.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c pathsys.c regexp.c rules.c scan.c search.c subst.c timestamp.c        variable.c modules.c strings.c filesys.c builtins.c class.c cwd.c native.c md5.c w32_getreg.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c execunix.c fileunix.c pathunix.c
      command.c:
      compile.c:
      constants.c:
      debug.c:
      execcmd.c:
      frames.c:
      function.c:
      glob.c:
      hash.c:
      hdrmacro.c:
      headers.c:
      jam.c:
      jambase.c:
      jamgram.c:
      lists.c:
      make.c:
      make1.c:
      object.c:
      option.c:
      output.c:
      parse.c:
      pathsys.c:
      regexp.c:
      rules.c:
      scan.c:  search.c:
      subst.c:
      timestamp.c:
      variable.c:
      modules.c:
      strings.c:
      filesys.c:
      builtins.c:
      class.c:
      cwd.c:
      native.c:
      md5.c:
      w32_getreg.c:
      modules/set.c:
      modules/path.c:
      modules/regex.c:
      modules/property-set.c:
      modules/sequence.c:
      modules/order.c:
      execunix.c:
      fileunix.c:
      pathunix.c:
      Undefined                       first referenced
      symbol                             in file
      clock_gettime                       timestamp.o
      ld: fatal: symbol referencing errors. No output written to bootstrap/jam0
      bash-3.2$

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

On Thu, Nov 28, 2019 at 7:48 PM Piotr Kowalski via Boost-users <[hidden email]> wrote:
I guess SunOS uses System V specification which is older than POSIX and only supports `` syntax. If you look at autotools they never generate $() to make sure it wil work everywhere even on older /bin/sh

czw., 28 lis 2019 o 14:33 David Demelier via Boost-users <[hidden email]> napisał(a):
Le 28/11/2019 à 12:22, Piotr Kowalski via Boost-users a écrit :
> build.sh is intended for /bin/sh but uses bash-specific syntax $(command)

$() is part of POSIX though so I suppose the SunOS default shell isn't
POSIX compliant or too old.

Regards,

--
David
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: [Urgent] ./bootstrap.sh from boost_1_70_0 is failing in SunOS

Boost - Users mailing list
Hi  Piotr and All,

On further analysis in boost code, I found below line of code causing "./bootstrap.sh"  to fail in SunOS.
Can some one look into it and suggest for a fix for Error 2.

Error 1  :    ./build.sh: syntax error at line 143: `machine=$' unexpected
   
      File name:   build.sh
      Line No    :   143 
      Fix           :    machine=`gcc -dumpmachine 2>/dev/null`     <-------  Piotr suggested


Error 2      clock_gettime                       timestamp.o
                    ld: fatal: symbol referencing errors. No output written to bootstrap/jam0

      File name: boost_1_70_0/tools/build/src/engine/timestamp.c
      Function:  timestamp_current() 
      Problematic code : line no 135 to 144, which are introduced in latest boost releases.

===============
   126  void timestamp_current( timestamp * const t )
   127  {
   128  #ifdef OS_NT
   129          /* GetSystemTimeAsFileTime()'s resolution seems to be about 15 ms on Windows
   130          * XP and under a millisecond on Windows 7.
   131          */
   132         FILETIME ft;
   133         GetSystemTimeAsFileTime( &ft );
   134         timestamp_from_filetime( t, &ft );
   135  #elif defined(_POSIX_TIMERS) && defined(CLOCK_REALTIME) && \
   136      (!defined(__GLIBC__) || (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 17))
   137         /* Some older versions of XCode define _POSIX_TIMERS, but don't actually
   138          * have clock_gettime.  Check CLOCK_REALTIME as well.  Prior to glibc 2.17,
   139          * clock_gettime requires -lrt.  This is a non-critical feature, so
   140          * we just disable it to keep bootstrapping simple.
   141          */
   142          struct timespec ts;
   143          clock_gettime( CLOCK_REALTIME, &ts );            <------------------------ It is causing ./bootstrap.sh fail with Error: 
ld: fatal: symbol referencing errors. No output written to bootstrap/jam0  
   144          timestamp_init( t, ts.tv_sec, ts.tv_nsec );

   145  #else  /* OS_NT */
   146
   147      timestamp_init( t, time( 0 ), 0 );
   148  #endif  /* OS_NT */
   149  }
====================


On Mon, Dec 2, 2019 at 6:25 PM kamallochan Jena <[hidden email]> wrote:
Hi All,

FYI: With my changes below error, has been fixed in SunOS. 
 
  Error:
 ./boost/thread/pthread/thread_data.hpp:60:5: error: missing binary operator before token "_sysconf"
 #if PTHREAD_STACK_MIN > 0
However waiting for your suggestion to fix below error observed in SunOS: 

     $ ./bootstrap.sh
       -n Bootstrapping the build engine with toolset sun...

       Failed to bootstrap the build engine
       Consult 'bootstrap.log' for more details  

   Error:
      pathunix.c:
      Undefined                       first referenced
      symbol                             in file
      clock_gettime                       timestamp.o
      ld: fatal: symbol referencing errors. No output written to bootstrap/jam0

Your advice or suggestions will be much appreciated!!!

Regards,
Kamal

On Mon, Dec 2, 2019 at 3:51 PM kamallochan Jena <[hidden email]> wrote:
Hi Piotr,

The above changes also not fixing the issue. Getting same error.

Changes: 
      File: boost_1_70_0/tools/build/src/engine/build.jam
      Line no: 469
      Modified line to   --libs = $(tool.$(toolset).linklibs) -lrt ;

Error:
   pathunix.c:
   Undefined                       first referenced
   symbol                             in file
   clock_gettime                       timestamp.o
   ld: fatal: symbol referencing errors. No output written to bootstrap/jam0


Thanks & Regards,
Kamal

On Sun, Dec 1, 2019 at 8:29 PM Piotr Kowalski <[hidden email]> wrote:
It seems that build.sh linked bjam correctly but then it does the bootstrapping using bjam itself.
That process is controlled from build.jam file inside src/engine directory.
I am not an expert on jam files but I would suggest to add -lrt to the --libs variable, i.e. line 469
--libs = $(tool.$(toolset).linklibs) ; should become --libs = $(tool.$(toolset).linklibs) -lrt ;



niedz., 1 gru 2019 o 06:18 kamallochan Jena <[hidden email]> napisał(a):
Continued to above mail: 

>> earlier versions of bootstrap did not use clock_gettime function and that made them link correctly.
Could you please update, in which version of boost the clock_gettime function introduced.

Thanks & Regards,
Kamal

On Sun, Dec 1, 2019 at 10:42 AM kamallochan Jena <[hidden email]> wrote:

Hi Piotr,

Thank you for your support and update on this issue!!!

As you suggested, I updated build.sh script and add -lrt at the end of line 350, but still facing the same error.
                             echo_run ${BOOST_JAM_CC} ${BOOST_JAM_OPT_JAM} ${BJAM_SOURCES} -lrt

Here is the details of Log: ----------------

$ ./bootstrap.sh
-n Bootstrapping the build engine with toolset sun...

Failed to bootstrap the build engine
Consult 'bootstrap.log' for more details

$ cat bootstrap.log
###
### Using 'sun' toolset.
###
rm -rf bootstrap
mkdir bootstrap
cc -o bootstrap/jam0 command.c compile.c constants.c debug.c execcmd.c frames.c function.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c pathsys.c regexp.c rules.c scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c class.c cwd.c native.c md5.c w32_getreg.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c execunix.c fileunix.c pathunix.c -lrt
command.c:
compile.c:
constants.c:
debug.c:
execcmd.c:
frames.c:
function.c:
glob.c:
hash.c:
hdrmacro.c:
headers.c:
jam.c:
jambase.c:
jamgram.c:
lists.c:
make.c:
make1.c:
object.c:
option.c:
output.c:
parse.c:
pathsys.c:
regexp.c:
rules.c:
scan.c:
search.c:
subst.c:
timestamp.c:
variable.c:
modules.c:
strings.c:
filesys.c:
builtins.c:
class.c:
cwd.c:
native.c:
md5.c:
w32_getreg.c:
modules/set.c:
modules/path.c:
modules/regex.c:
modules/property-set.c:
modules/sequence.c:
modules/order.c:
execunix.c:
fileunix.c:
pathunix.c:
./bootstrap/jam0 -f build.jam --toolset=sun --toolset-root=/opt/SUNWspro/ clean
...found 1 target...
...updating 1 target...
...updated 1 target...
./bootstrap/jam0 -f build.jam --toolset=sun --toolset-root=/opt/SUNWspro/
...found 160 targets...
...updating 2 targets...
[COMPILE] bin.solarisx86/b2
command.c:
compile.c:
constants.c:
debug.c:
debugger.c:
"debugger.c", line 2673: warning: statement not reached
execcmd.c:
frames.c:
function.c:
glob.c:
hash.c:
hcache.c:
headers.c:
hdrmacro.c:
jam.c:
jambase.c:
jamgram.c:
lists.c:
make.c:
make1.c:
mem.c:
object.c:
option.c:
output.c:
parse.c:
pathsys.c:
regexp.c:
rules.c:
scan.c:
search.c:
subst.c:
w32_getreg.c:
timestamp.c:
variable.c:
modules.c:
strings.c:
filesys.c:
builtins.c:
class.c:
cwd.c:
native.c:
md5.c:
modules/set.c:
modules/path.c:
modules/regex.c:
modules/property-set.c:
modules/sequence.c:
modules/order.c:
execunix.c:
fileunix.c:
pathunix.c:
Undefined                       first referenced
 symbol                             in file
clock_gettime                       timestamp.o
ld: fatal: symbol referencing errors. No output written to bin.solarisx86/b2

    "cc"   -o bin.solarisx86/b2 "-DNDEBUG" "-DOPT_HEADER_CACHE_EXT" "-DOPT_GRAPH_DEBUG_EXT" "-DOPT_SEMAPHORE" "-DOPT_AT_FILES" "-DOPT_DEBUG_PROFILE" "-DJAM_DEBUGGER" "-DOPT_FIX_TARGET_VARIABLES_EXT" "-DOPT_IMPROVED_PATIENCE_EXT" "-DYYSTACKSIZE=5000" "-s" "-xO3" "command.c" "compile.c" "constants.c" "debug.c" "debugger.c" "execcmd.c" "frames.c" "function.c" "glob.c" "hash.c" "hcache.c" "headers.c" "hdrmacro.c" "jam.c" "jambase.c" "jamgram.c" "lists.c" "make.c" "make1.c" "mem.c" "object.c" "option.c" "output.c" "parse.c" "pathsys.c" "regexp.c" "rules.c" "scan.c" "search.c" "subst.c" "w32_getreg.c" "timestamp.c" "variable.c" "modules.c" "strings.c" "filesys.c" "builtins.c" "class.c" "cwd.c" "native.c" "md5.c" "modules/set.c" "modules/path.c" "modules/regex.c" "modules/property-set.c" "modules/sequence.c" "modules/order.c" "execunix.c" "fileunix.c" "pathunix.c"

...failed [COMPILE] bin.solarisx86/b2...
...skipped bjam for lack of b2...
...failed updating 1 target...
...skipped 1 target...
$



On Fri, Nov 29, 2019 at 5:07 PM Piotr Kowalski <[hidden email]> wrote:
Hi Kamal
From what I can see, earlier versions of bootstrap did not use clock_gettime function and that made them link correctly.
This function on Solaris requires linking with -lrt

Since you are doing this only for yourself you can edit build.sh script and add -lrt at the end of line 350:
echo_run ${BOOST_JAM_CC} ${BOOST_JAM_OPT_JAM} ${BJAM_SOURCES} -lrt

If that helps, boost team may need to fix build.sh to add -lrt if building on Solaris platform

pt., 29 lis 2019 o 08:44 kamallochan Jena <[hidden email]> napisał(a):
Hi All,

In SunOS, even I am getting below errors which has been reported before by some one and is discussed in "https://github.com/boostorg/thread/issues/283 with Fix.

Error:
./boost/thread/pthread/thread_data.hpp:60:5: error: missing binary operator before token "_sysconf"
 #if PTHREAD_STACK_MIN > 0

If Yes, From where the latest boost kit can be downloaded with above fix ??
Is the above fix, also resolve the previous syntax error "./build.sh: syntax error at line 143: `machine=$' unexpected " ??

Kindly confirm!!!

Regards,
Kamal
 

On Fri, Nov 29, 2019 at 12:52 PM kamallochan Jena <[hidden email]> wrote:
Hi All,

FYI, 
bootstarp.sh from  boost_1_56_0 working fine in same SunOS, where boost_1_70_0 is causing the problem.

Thanks,
Kamal

On Fri, Nov 29, 2019 at 10:54 AM kamallochan Jena <[hidden email]> wrote:
Hi Piotr and David, 
    Thank you for your response.

Have modified the build.sh as mentioned, and for all below cases build.sh is failing with Error:  ld: fatal: symbol referencing errors. No output written to bootstrap/jam0

Case 1>     #!/bin/sh   --->  #!/bin/bash
Case 2>     machine=$(gcc -dumpmachine 2>/dev/null)   ---> machine=`gcc -dumpmachine 2>/dev/null`
Case 3>     machine=$(gcc -dumpmachine 2>/dev/null)   --->  machine=` echo $(gcc -dumpmachine 2>/dev/null) `
   
FYI, default shell of SunOS is /bin/sh
        $ echo $SHELL
        /bin/sh

Details:
  $ ./bootstrap.sh
      -n Bootstrapping the build engine with toolset sun...

      Failed to bootstrap the build engine
      Consult 'bootstrap.log' for more details

  $ cat bootstrap.log
     ###
     ### Using 'sun' toolset.
     ###
     rm -rf bootstrap
     mkdir bootstrap
     cc -o bootstrap/jam0 command.c compile.c constants.c debug.c execcmd.c frames.c function.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c pathsys.c regexp.c rules.c scan.c search.c subst.c timestamp.c        variable.c modules.c strings.c filesys.c builtins.c class.c cwd.c native.c md5.c w32_getreg.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c execunix.c fileunix.c pathunix.c
      command.c:
      compile.c:
      constants.c:
      debug.c:
      execcmd.c:
      frames.c:
      function.c:
      glob.c:
      hash.c:
      hdrmacro.c:
      headers.c:
      jam.c:
      jambase.c:
      jamgram.c:
      lists.c:
      make.c:
      make1.c:
      object.c:
      option.c:
      output.c:
      parse.c:
      pathsys.c:
      regexp.c:
      rules.c:
      scan.c:  search.c:
      subst.c:
      timestamp.c:
      variable.c:
      modules.c:
      strings.c:
      filesys.c:
      builtins.c:
      class.c:
      cwd.c:
      native.c:
      md5.c:
      w32_getreg.c:
      modules/set.c:
      modules/path.c:
      modules/regex.c:
      modules/property-set.c:
      modules/sequence.c:
      modules/order.c:
      execunix.c:
      fileunix.c:
      pathunix.c:
      Undefined                       first referenced
      symbol                             in file
      clock_gettime                       timestamp.o
      ld: fatal: symbol referencing errors. No output written to bootstrap/jam0
      bash-3.2$

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

On Thu, Nov 28, 2019 at 7:48 PM Piotr Kowalski via Boost-users <[hidden email]> wrote:
I guess SunOS uses System V specification which is older than POSIX and only supports `` syntax. If you look at autotools they never generate $() to make sure it wil work everywhere even on older /bin/sh

czw., 28 lis 2019 o 14:33 David Demelier via Boost-users <[hidden email]> napisał(a):
Le 28/11/2019 à 12:22, Piotr Kowalski via Boost-users a écrit :
> build.sh is intended for /bin/sh but uses bash-specific syntax $(command)

$() is part of POSIX though so I suppose the SunOS default shell isn't
POSIX compliant or too old.

Regards,

--
David
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: [Urgent] ./bootstrap.sh from boost_1_70_0 is failing in SunOS

Boost - Users mailing list
On Tue, Dec 3, 2019 at 5:05 AM kamallochan Jena via Boost-users <[hidden email]> wrote:
Hi  Piotr and All,

On further analysis in boost code, I found below line of code causing "./bootstrap.sh"  to fail in SunOS.
Can some one look into it and suggest for a fix for Error 2.

Error 1  :    ./build.sh: syntax error at line 143: `machine=$' unexpected
   
      File name:   build.sh
      Line No    :   143 
      Fix           :    machine=`gcc -dumpmachine 2>/dev/null`     <-------  Piotr suggested


Error 2      clock_gettime                       timestamp.o
                    ld: fatal: symbol referencing errors. No output written to bootstrap/jam0

      File name: boost_1_70_0/tools/build/src/engine/timestamp.c
      Function:  timestamp_current() 
      Problematic code : line no 135 to 144, which are introduced in latest boost releases.

===============
   126  void timestamp_current( timestamp * const t )
   127  {
   128  #ifdef OS_NT
   129          /* GetSystemTimeAsFileTime()'s resolution seems to be about 15 ms on Windows
   130          * XP and under a millisecond on Windows 7.
   131          */
   132         FILETIME ft;
   133         GetSystemTimeAsFileTime( &ft );
   134         timestamp_from_filetime( t, &ft );
   135  #elif defined(_POSIX_TIMERS) && defined(CLOCK_REALTIME) && \
   136      (!defined(__GLIBC__) || (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 17))
   137         /* Some older versions of XCode define _POSIX_TIMERS, but don't actually
   138          * have clock_gettime.  Check CLOCK_REALTIME as well.  Prior to glibc 2.17,
   139          * clock_gettime requires -lrt.  This is a non-critical feature, so
   140          * we just disable it to keep bootstrapping simple.
   141          */
   142          struct timespec ts;
   143          clock_gettime( CLOCK_REALTIME, &ts );            <------------------------ It is causing ./bootstrap.sh fail with Error: 
ld: fatal: symbol referencing errors. No output written to bootstrap/jam0  

The clock_gmtime function is part of POSIX. But it looks like your compiler is not including the appropriate POSIX runtime library automatically. If it's the SunOS "cc" compiler you can change this line <https://github.com/boostorg/build/blob/boost-1.70.0/src/engine/build.sh#L253> to:

    BOOST_JAM_CC="cc -lrt"

Per current Oracle docs <https://docs.oracle.com/cd/E19109-01/tsolaris7/805-8069/6j7j9vnt1/index.html>. If it's some other compiler you'll have to find the equivalent BOOST_JAM_CC line and add that "-lrt" option.

--
-- Rene Rivera
-- Grafik - Don't Assume Anything
-- Robot Dreams - http://robot-dreams.net


_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users