Skip to content

Compile error: InspectorProtocol.cpp:23:5: error: 'snprintf' is not a member of 'std' #10475

Description

@Bilge
  • Version: 6.7.0
  • Platform: Debian 8
/root/buildroot-2016.11/output/build/nodejs-6.7.0/out/Release/obj/gen/blink/platform/inspector_protocol/InspectorProtocol.cpp: In function 'void blink::protocol::internal::intToStr(int, char*, size_t)':
/root/buildroot-2016.11/output/build/nodejs-6.7.0/out/Release/obj/gen/blink/platform/inspector_protocol/InspectorProtocol.cpp:23:5: error: 'snprintf' is not a member of 'std'
     std::snprintf(buffer, length, "%d", number);
     ^
/root/buildroot-2016.11/output/build/nodejs-6.7.0/out/Release/obj/gen/blink/platform/inspector_protocol/InspectorProtocol.cpp: In function 'void blink::protocol::internal::doubleToStr(double, char*, size_t)':
/root/buildroot-2016.11/output/build/nodejs-6.7.0/out/Release/obj/gen/blink/platform/inspector_protocol/InspectorProtocol.cpp:28:5: error: 'snprintf' is not a member of 'std'
     std::snprintf(buffer, length, "%f", number);
     ^
/root/buildroot-2016.11/output/build/nodejs-6.7.0/out/Release/obj/gen/blink/platform/inspector_protocol/InspectorProtocol.cpp: In function 'void blink::protocol::internal::doubleToStr3(double, char*, size_t)':
/root/buildroot-2016.11/output/build/nodejs-6.7.0/out/Release/obj/gen/blink/platform/inspector_protocol/InspectorProtocol.cpp:33:5: error: 'snprintf' is not a member of 'std'
     std::snprintf(buffer, length, "%.3g", number);
     ^
/root/buildroot-2016.11/output/build/nodejs-6.7.0/out/Release/obj/gen/blink/platform/inspector_protocol/InspectorProtocol.cpp: In function 'void blink::protocol::internal::doubleToStr6(double, char*, size_t)':
/root/buildroot-2016.11/output/build/nodejs-6.7.0/out/Release/obj/gen/blink/platform/inspector_protocol/InspectorProtocol.cpp:38:5: error: 'snprintf' is not a member of 'std'
     std::snprintf(buffer, length, "%.6g", number);
     ^

I am using a uClibc 0.9.33.2 toolchain (latest) available from this crosstool-NG project.

Activity

  1. added
    inspectorIssues and PRs related to the V8 inspector protocol.
    buildIssues and PRs related to Node.js builds or CI infrastructure.
    on Dec 27, 2016
  2. Bilge commented on Dec 28, 2016

    @Bilge
    Author

    I have since learned uClibc has been abandoned and forked as uClibc-ng. Upgrading to this version resolved the issue.

  3. hanelyp commented on May 2, 2017

    @hanelyp

    I'm getting what looks like the same error with nodejs 6.9.4 building on Gentoo
    /var/tmp/portage/net-libs/nodejs-6.9.4/work/node-v6.9.4/out/Release/obj/gen/blink/platform/inspector_protocol/InspectorProtocol.cpp:23:5: error: 'snprintf' is not a member of 'std'
    and repeats ...

    Research suggests that this (and similar problems I'm having with other packages) relates to header file cleanup where some includes are no longer made indirectly.

  4. MylesBorins commented on May 3, 2017

    @MylesBorins
    Contributor

    @addaleax I believe this came up over at the tessel project as well /cc @rwaldron

    We should likely be explicit about the headers. Would this be only for v6.x?

  5. addaleax commented on May 3, 2017

    @addaleax
    Member

    @MylesBorins Sorry, got a bit of an unexpected ping here … what can I do here? This doesn’t seem to be an issue on v6.x-staging, as far as I can tell … if it is, it’s quite likely that that’s a problem with the use libstdc++, not with the inspector code.

    We should likely be explicit about the headers

    Sorry, could you explain what you mean by that?

  6. MylesBorins commented on May 4, 2017

    @MylesBorins
    Contributor

    you we explicitly import the headers with the missing functions

  7. addaleax commented on May 4, 2017

    @addaleax
    Member

    yea but as far as I can tell the right headers are already included? :/

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

    buildIssues and PRs related to Node.js builds or CI infrastructure.inspectorIssues and PRs related to the V8 inspector protocol.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions