Build error with 1.0.39 on linux

Help
2008-12-15
2013-04-29
  • I'm trying to build from source on Ubuntu but I get an error:
    error: "hw.ncpu" is an unknown key
    and then the script hangs. Has anyone else experienced this?

    Here's the output of the build:

    $ ./asl_1.0.39_net_setup.sh
    tar -xf boost_1_37_0.tar.bz2
    rm -rf adobe_root/boost_libraries
    mv boost_1_37_0 adobe_root/boost_libraries
    tar -xf tbb21_009oss_src.tgz
    rm -rf adobe_root/intel_tbb_libraries
    mv tbb21_009oss adobe_root/intel_tbb_libraries
    adobe_root/adobe_source_libraries/tools/patch_boost.sh
    looking in '/home/jose/pub/asl/adobe_root/adobe_source_libraries'...
    patching file ../boost_libraries/boost/test/floating_point_comparison.hpp
    patching file ../boost_libraries/tools/build/v2/tools/darwin.jam
    patching file ../boost_libraries/tools/build/v2/tools/msvc.jam
    patching file ../boost_libraries/tools/jam/src/expand.c
    Patching of Boost succeeded. Happy coding!
    ../adobe_source_libraries/tools/build.sh
    ./install.sh
    /home/jose/pub/asl/adobe_root/boost_libraries/tools/jam/src/build.sh
    ###
    ### Using 'gcc' toolset.
    ###
    rm -rf bootstrap
    mkdir bootstrap
    gcc -o bootstrap/jam0 command.c compile.c debug.c expand.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c newstr.c option.c output.c parse.c pathunix.c pathvms.c regexp.c rules.c scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c pwd.c class.c native.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
    compile.c: In function ‘debug_compile’:
    compile.c:1407: warning: format not a string literal and no format arguments
    debug.c: In function ‘dump_profile_entry’:
    debug.c:118: warning: format ‘%10d’ expects type ‘int’, but argument 2 has type ‘long unsigned int’
    debug.c:118: warning: format ‘%10d’ expects type ‘int’, but argument 6 has type ‘long unsigned int’
    debug.c:118: warning: format ‘%10d’ expects type ‘int’, but argument 7 has type ‘long unsigned int’
    make1.c: In function ‘make1cmds’:
    make1.c:1021: warning: format not a string literal and no format arguments
    output.c: In function ‘out_action’:
    output.c:70: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘long int’
    ./bootstrap/jam0 -f build.jam --toolset=gcc --toolset-root= clean
    ...found 1 target...
    ...updating 1 target...
    ...updated 1 target...
    ./bootstrap/jam0 -f build.jam --toolset=gcc --toolset-root=
    ...found 47 targets...
    ...updating 2 targets...
    [MKDIR] bin.linuxx86
    [COMPILE] bin.linuxx86/bjam
    compile.c: In function ‘debug_compile’:
    compile.c:1407: warning: format not a string literal and no format arguments
    debug.c: In function ‘dump_profile_entry’:
    debug.c:118: warning: format ‘%10d’ expects type ‘int’, but argument 2 has type ‘long unsigned int’
    debug.c:118: warning: format ‘%10d’ expects type ‘int’, but argument 6 has type ‘long unsigned int’
    debug.c:118: warning: format ‘%10d’ expects type ‘int’, but argument 7 has type ‘long unsigned int’
    hcache.c: In function ‘write_netstring’:
    hcache.c:165: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 3 has type ‘size_t’
    hcache.c: In function ‘hcache_done’:
    hcache.c:317: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 3 has type ‘int’
    hcache.c:318: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 3 has type ‘int’
    hcache.c:320: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 3 has type ‘int’
    make1.c: In function ‘make1cmds’:
    make1.c:1021: warning: format not a string literal and no format arguments
    output.c: In function ‘out_’:
    output.c:23: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
    output.c: In function ‘out_action’:
    output.c:70: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘long int’
    variable.c: In function ‘var_string_to_file’:
    variable.c:419: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
    variable.c:420: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
    variable.c:460: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
    variable.c:461: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
    ...updated 2 targets...
    find: warning: you have specified the -maxdepth option after a non-option argument -type, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it).  Please specify options before other arguments.

    Boost.Jam  Version 3.1.16. OS=LINUX.
       Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc. 
       Copyright 2001 David Turner.
       Copyright 2001-2004 David Abrahams.
       Copyright 2002-2005 Rene Rivera.
       Copyright 2003-2005 Vladimir Prus.
    error: "hw.ncpu" is an unknown key
    ../adobe_source_libraries/tools/bjam --without-python -j debug release
    ...patience...
    ...patience...
    ...found 7220 targets...
    ...updating 1034 targets...
    ^C

     
    • Based on the errors you've reported it seems to me the problem lies within the bjam implementation, and is not something ASL-specific. We leverage bjam from the Boost distributions; I'd advise you search the boost mailing lists for the problem you're seeing, and if nothing turns up there try sending them an email. Hope you find a solution!

      Blessings,
      Foster

       
    • Thanks for the response. Indeed, there's something wrong in building boost (error: "hw.ncpu" is an unknown key). I just tried removing the existing (and older) boost version that was already installed, but the behavior was the same. I'll search deeper.

       
    • Thanks for the response. Indeed, there's something wrong in building boost (error: "hw.ncpu" is an unknown key). I just tried removing the existing (and older) boost version that was already installed, but the behavior was the same. I'll search deeper.

       
    • Sorry about the duplicate post above.

      Looks like the fundamental problem is that linux is not supported!
      I found this thread touching on the issue:
      https://sourceforge.net/mailarchive/message.php?msg_id=000901c78e0e%24a1e34160%24e5a9c420%24%40org

       
    • Mat Marcus
      Mat Marcus
      2008-12-16

      Two data points for you:
      1) adobe_platform_libraries are not currently linux compatible.
      2) I am currently building pre-release adobe_source_libraries 1.0.40, along with bjam and the required parts of boost under debian and ubuntu. I believe this also worked with 1.0.39. If I recall correctly, a distribution that provides gcc 3.4 or later is required.

       
    • I can attest  that 1.0.39 does not work on Ubuntu. There are a few problems:

      1. asl_1.0.39_net_setup.sh - using sysctl to compute the number of CPUs for the -j does not work (see the error above). This is minor.
      2. for linux, the stub is used for platform specific files and it's missing quite a few files (adobe_platform_libraries/stub).
      3. I can't find any GTK support.

      I was surprised since the web site and release notes imply that it can support linux.

       
      • Mat Marcus
        Mat Marcus
        2008-12-23

        Thanks for reporting that sysctl is not the right way to determine the number of available cores on *n*x systems. If you happen to know the correct way, I would be happy to update the script. Otherwise, I may fall back to hardwiring it to 1 or 2.

        ASL is partially supported on linux. Our libraries consist of two components: adobe_source_libraries and adobe_platform libraries. The former is supported under mac and windows and tested under some *n*x platforms. The latter consists of widget wrappers, glue, and demo applications for mac Carbon and Win32 only. No official support is offered, but the library is in regular use, and it is tested on those platforms prior to each release. For a time there were some open-source contributors maintaining wrappers for a linux widget set, but that code has fallen into disrepair.

        1.0.40 will be released shortly. ASL 1.0.40 has been tested under mac, win32, and ubuntu 8.10. APL 1.0.40 has been tested under mac and win. See the upcoming release notes for more details

        Thanks,
        Mat