Skip to content

FreeBSD Build --with-dtrace fails #461

Description

@No9

Apologies if this is a known issue as I seem to recall from a nodeup that there was some significant changes for DTrace going into 0.12.

Anyway I hope this is useful

The same issue presents on node v0.11.14 on the same system.
But on the same system v0.10.35 compiles OK
(But has the post compilation problem highlighted here
https://gist.github.com/indutny/d3fee964995eea206fb3)

On a digital ocean droplet..
Full info on all the ENV config I did here:
http://venshare.com/2015/01/16/dtrace-with-iojs-on-freebsd-10-1-using-digital-ocean/

So the following:

> sudo ./configure --with-dtrace --dest-cpu=x64
> sudo gmake

Fails with

fockf /usr/home/freebsd/io.js/out/Release/linker.lock g++ -pthread -rdynamic -m64 -Wl,--export-dynamic -Wl,--whole-archive /usr/home/freebsd/io.js/out/Release/libopenssl.a -Wl,--no-whole-archive -Wl,-z,noexecstack -Wl,--whole-archive /usr/home/freebsd/io.js/out/Release/obj.target/deps/v8/tools/gyp/libv8_base.a -Wl,--no-whole-archive -pthread  -o /usr/home/freebsd/io.js/out/Release/iojs -Wl,--start-group /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/debug-agent.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/async-wrap.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/fs_event_wrap.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/cares_wrap.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/handle_wrap.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/node.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/node_buffer.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/node_constants.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/node_contextify.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/node_file.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/node_http_parser.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/node_javascript.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/node_main.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/node_os.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/node_v8.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/node_v8_platform.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/node_stat_watcher.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/node_watchdog.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/node_zlib.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/node_i18n.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/pipe_wrap.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/signal_wrap.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/smalloc.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/spawn_sync.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/string_bytes.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/stream_wrap.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/tcp_wrap.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/timer_wrap.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/tty_wrap.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/process_wrap.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/udp_wrap.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/uv.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/util.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/node_crypto.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/node_crypto_bio.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/node_crypto_clienthello.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/tls_wrap.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/node_dtrace.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/node_dtrace_ustack.o /usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/node_dtrace_provider.o /usr/home/freebsd/io.js/out/Release/obj.target/deps/cares/libcares.a /usr/home/freebsd/io.js/out/Release/obj.target/deps/openssl/libopenssl.a /usr/home/freebsd/io.js/out/Release/obj.target/deps/zlib/libzlib.a /usr/home/freebsd/io.js/out/Release/obj.target/deps/http_parser/libhttp_parser.a /usr/home/freebsd/io.js/out/Release/obj.target/deps/uv/libuv.a /usr/home/freebsd/io.js/out/Release/obj.target/deps/v8/tools/gyp/libv8_base.a /usr/home/freebsd/io.js/out/Release/obj.target/deps/v8/tools/gyp/libv8_libbase.a /usr/home/freebsd/io.js/out/Release/obj.target/deps/v8/tools/gyp/libv8_snapshot.a -Wl,--end-group -lelf -lutil -lkvm -L/usr/local/lib -lexecinfo -lm
clang++: error: no such file or directory: '/usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/node_dtrace_ustack.o'
clang++: error: no such file or directory: '/usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/node_dtrace_provider.o'
iojs.target.mk:198: recipe for target '/usr/home/freebsd/io.js/out/Release/iojs' failed
gmake[1]: *** [/usr/home/freebsd/io.js/out/Release/iojs] Error 1
gmake[1]: Leaving directory '/usr/home/freebsd/io.js/out'
Makefile:52: recipe for target 'iojs' failed
gmake: *** [iojs] Error 2

Activity

  1. bnoordhuis commented on Jan 16, 2015

    @bnoordhuis
    Member

    @indutny or @jbergstroem, maybe one of you can take a look?

  2. jbergstroem commented on Jan 19, 2015

    @jbergstroem
    Member

    Pretty busy at the moment, but the issue at least seems to start from tools/genv8constants.py not generating a proper header; the output is essentially empty from this:

    builder% tools/genv8constants.py foo.h /usr/home/jbergstroem/io.js/out/Release/obj.target/deps/v8/tools/gyp/libv8_base.a && cat foo.h 
    
    /*
     * File automatically generated by genv8constants. Do not edit.
     *
     * The following offsets are dynamically from libv8_base.a.  See src/v8ustack.d
     * for details on how these values are used.
     */
    
    #ifndef V8_CONSTANTS_H
    #define V8_CONSTANTS_H
    
    
    
    #endif /* V8_CONSTANTS_H */
  3. indutny commented on Jan 19, 2015

    @indutny
    Member

    Oh gosh, need to look into it.

  4. No9 commented on Jan 23, 2015

    @No9
    MemberAuthor

    So @indutny @jbergstroem spent a little time on this tonight.

    objdump -z -D /usr/home/freebsd/io.js/out/Release/obj.target/deps/v8/tools/gyp/libv8_base.a | grep frametype_EntryFrame
    Returns nothing

    But
    objdump -z -D /usr/home/freebsd/node/out/Release/obj.target/deps/v8/tools/gyp/libv8_base.a | grep frametype_EntryFrame
    In the node v.0.10.35 build returns
    0000000000000000 <v8dbg_frametype_EntryFrame>:

    So it would seem that the technique used to identify the V8_CONSTANTS in tools/genv8constants.py is not going to work with the current build output of
    /usr/home/freebsd/io.js/out/Release/obj.target/deps/v8/tools/gyp/libv8_base.a

    Could there be an option missing on the V8 build part that is preventing the inclusion of the v8dbg sym?
    Or have they gone away completely in this version of V8?

  5. indutny commented on Feb 2, 2015

    @indutny
    Member

    Oddly, I got this:

    clang++: error: no such file or directory: '/usr/home/indutny/io.js/out/Release/obj.target/iojs/src/node_dtrace_ustack.o'
    clang++: error: no such file or directory: '/usr/home/indutny/io.js/out/Release/obj.target/iojs/src/node_dtrace_provider.o'
    iojs.target.mk:198: recipe for target '/usr/home/indutny/io.js/out/Release/iojs' failed
    

    When trying to build it... Will figure out details.

  6. indutny commented on Feb 2, 2015

    @indutny
    Member

    Should be fixed by https://codereview.chromium.org/894003003/, I guess.

  7. indutny commented on Feb 2, 2015

    @indutny
    Member

    And by partially reverting: 8a83eba

  8. No9 commented on Feb 2, 2015

    @No9
    MemberAuthor

    @indutny Cheers Ill apply that and see where I get to.

    Also can you verify that I will need to patch FreeBSD with
    https://svnweb.freebsd.org/base/head/cddl/contrib/opensolaris/lib/lib0dtrace/common/drti.c?pathrev=276250&view=log&r1=276250&log_pagestart=0

    Because of dtrace DOF node: .SUNW_dof section corrupt

    As mentioned here https://gist.github.com/indutny/d3fee964995eea206fb3#comment-1373787

    Thanks again for finding time to dive into these issues 👍

  9. indutny commented on Feb 2, 2015

    @indutny
    Member

    That svnweb link gives me 404... :(

  10. No9 commented on Feb 2, 2015

    @No9
    MemberAuthor

    Hmmm yup broken for me too :(

    This is the another view here.
    https://svnweb.freebsd.org/base?view=revision&revision=276250

  11. indutny commented on Feb 2, 2015

    @indutny
    Member

    Yeah, this is the fix. Luckily, it does not require rebuilding kernel.

  12. No9 commented on Feb 3, 2015

    @No9
    MemberAuthor

    So applyied the patches to
    globals.h
    objects.h
    gen-postmortem-metadata.py
    And common.gypi has the patch you mention
    But still getting

    clang++: error: no such file or directory: '/usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/node_dtrace_ustack.o'
    clang++: error: no such file or directory: '/usr/home/freebsd/io.js/out/Release/obj.target/iojs/src/node_dtrace_provider.o'
    iojs.target.mk:198: recipe for target '/usr/home/freebsd/io.js/out/Release/iojs' failed
    gmake[1]: *** [/usr/home/freebsd/io.js/out/Release/iojs] Error 1
    gmake[1]: Leaving directory '/usr/home/freebsd/io.js/out'
    Makefile:52: recipe for target 'iojs' failed
    gmake: *** [iojs] Error 2
    

    Have I missed something?

  13. indutny commented on Feb 3, 2015

    @indutny
    Member

    Looking...

  14. indutny commented on Feb 3, 2015

    @indutny
    Member

    @No9 see https://github.com/indutny/io.js/tree/fix/postmortem for progress. So far getting:

    failed to resolve INP_IPV4: Unknown variable name
    
  15. 1 remaining item

  16. indutny commented on Feb 3, 2015

    @indutny
    Member

    @No9 landed last patch, should be working fine now. Could you please verify?

  17. No9 commented on Feb 3, 2015

    @No9
    MemberAuthor

    Cloning and testing now

  18. No9 commented on Feb 3, 2015

    @No9
    MemberAuthor

    Yeah built !!

    $ node
    dtrace DOF iojs: .SUNW_dof section corrupt
    dtrace DOF iojs: .SUNW_dof section corrupt
    > process.version
    > 'v1.0.5'

    Now I have to put the BSD patch in to get rid of

    dtrace DOF iojs: .SUNW_dof section corrupt
    dtrace DOF iojs: .SUNW_dof section corrupt
    

    Should we validate this on illumOS too?

  19. indutny commented on Feb 3, 2015

    @indutny
    Member

    idk, do we want to? :) Thanks for testing FreeBSD.

  20. No9 commented on Feb 3, 2015

    @No9
    MemberAuthor

    LOL I have an openindiana I can take for a quick spin. Ill kick it off now "to be sure to be sure"

  21. indutny commented on Feb 3, 2015

    @indutny
    Member

    See #706 for complete rebased fix.

  22. added 3 commits that reference this issue on Feb 3, 2015
    8b88ff8
    6a5d731
    14684d3
  23. indutny commented on Feb 3, 2015

    @indutny
    Member

    Assuming "fixed"!

  24. No9 commented on Feb 3, 2015

    @No9
    MemberAuthor

    Yeah so all my illumOS distros are back at g++4.6 so I couldn't validate that easily
    Happy to call it fixed too
    Thanks for taking time on the @indutny

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions