Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

node --vars broken in 0.5.4 #1536

Closed
laverdet opened this issue Aug 15, 2011 · 16 comments
Closed

node --vars broken in 0.5.4 #1536

laverdet opened this issue Aug 15, 2011 · 16 comments

Comments

@laverdet
Copy link

Bisects to this revision, though not very helpful..
df22ccb

@bnoordhuis
Copy link
Member

@ry - is it safe to remove the #if 0 again at https://github.com/joyent/node/blob/9728723/src/node_version.h#L22 ?

@laverdet
Copy link
Author

I hope you guys can get this in for 0.5.5. Without node --vars my build is failing and I've gotten 2 reports so far. I confirmed that if I uncomment the include that bnoordhuis mentioned it works as expected. Thanks!

@ry
Copy link

ry commented Aug 17, 2011

@laverdet what do you need node --vars for?

@laverdet
Copy link
Author

I use it in my build to get the install prefix for node along with the platform. I could switch to pulling that info from within node itself using the process object, but it seemed as though the missing node --vars was a mistake. If this is going away permanently I can get along.

@marook
Copy link

marook commented Aug 23, 2011

'$ node --vars' doesen't report NODE_PREFIX and NODE_CFLAGS when 'node_config.h' is not included. NODE_PREFIX and NODE_CFLAGS not set causes my '$ npm install libxmljs' build to fail because i've installed node to ~/.local.

laverdet added a commit to laverdet/node-fibers that referenced this issue Aug 28, 2011
`node --vars` no longer does anything. It doesn't seem like this is
coming back as there's radio silence on nodejs/node-v0.x-archive#1536 and 0.5.5 has
been tagged with the missing flag. This is just a build tweak to pull
installation information from the `process` object inside of node.
@polotek
Copy link

polotek commented Sep 10, 2011

@ry any word on this? Or recommend some other way to properly retrieve build info for node?

@bnoordhuis
Copy link
Member

Let's decide if we want to bring back --vars in 0.6.1.

@polotek
Copy link

polotek commented Nov 7, 2011

I'm not attached to --vars. But we do need a recommended, non-hacky solution for getting build info. I'm a little out of my depth here, so I don't have any suggestions. Sorry.

@laverdet
Copy link
Author

laverdet commented Nov 7, 2011

I forgot what all node --vars provided, but you can get pretty valuable information from the process object.

marcel@fantasma ~ $ echo 'console.log(process.platform)' | node
linux
marcel@fantasma ~ $ echo 'console.log(process.arch)' | node
x64
marcel@fantasma ~ $ echo 'console.log(process.versions.v8)' | node
3.7.3

I replaced my build with this a long time ago when I realized it was likely node --vars wasn't coming back.

@laverdet
Copy link
Author

laverdet commented Nov 7, 2011

That said, I'm ok closing this one out if no one feels really strongly about it. I don't need it anymore.

@marook
Copy link

marook commented Nov 8, 2011

Maybe the build flags can be made available through a configuration script? Like GTK for example uses a gtk-config script to return the build vars.

Here's an GTK tutorial which uses the gtk-config script http://www.gtk.org/tutorial1.2/gtk_tut-2.html

@SaltwaterC
Copy link

@laverdet: yes, your solution works with 0.5.x and 0.6. But let's see what happens with 0.4.x:

node -v
v0.4.12
echo 'console.log(process.platform)' | node

readline.js:80
    tty.setRawMode(true);
        ^
Error: ENOTTY, Inappropriate ioctl for device
    at new Interface (readline.js:80:9)
    at Object.createInterface (readline.js:38:10)
    at new REPLServer (repl.js:110:16)
    at Object.start (repl.js:226:10)
    at Function.runRepl (node.js:370:26)
    at startup (node.js:61:13)
    at node.js:448:3

If you have a better suggestion that works with the old stable, please let us know.

@bnoordhuis
Copy link
Member

@SaltwaterC: try node -e process.platform

@SaltwaterC
Copy link

@bnoordhuis: thanks. That works properly.

@ry
Copy link

ry commented Nov 8, 2011

What exactly do you need --vars for? Please link to code. These flags are GCC specific so we would rather not have them.

@laverdet
Copy link
Author

I'm just going to close this. If anyone can think of anything they can't get from the process object please reopen.

lyonplus pushed a commit to lyonplus/node that referenced this issue May 22, 2015
PR-URL: nodejs/node#1532

Notable Changes:

* crypto: significantly reduced memory usage for TLS (Fedor Indutny & Сковорода
  Никита Андреевич) nodejs#1529
* net: socket.connect() now accepts a 'lookup' option for a custom DNS
  resolution mechanism, defaults to dns.lookup() (Evan Lucas) nodejs#1505
* npm: Upgrade npm to 2.9.0. See the v2.8.4 and v2.9.0 release notes for
  details. Notable items:
  - Add support for default author field to make npm init -y work without
    user-input (@othiym23) npm/npm/d8eee6cf9d
  - Include local modules in npm outdated and npm update (@ArnaudRinquin)
    npm/npm#7426
  - The prefix used before the version number on npm version is now configurable
    via tag-version-prefix (@kkragenbrink) npm/npm#8014
* os: os.tmpdir() is now cross-platform consistent and will no longer returns a
  path with a trailling slash on any platform (Christian Tellnes) nodejs#747
* process:
  - process.nextTick() performance has been improved by between 2-42% across the
    benchmark suite, notable because this is heavily used across core (Brian White) nodejs#1548
  - New process.geteuid(), process.seteuid(id), process.getegid() and
    process.setegid(id) methods allow you to get and set effective UID and GID
    of the process (Evan Lucas) nodejs#1536
* repl:
  - REPL history can be persisted across sessions if the NODE_REPL_HISTORY_FILE
    environment variable is set to a user accessible file,
    NODE_REPL_HISTORY_SIZE can set the maximum history size and defaults to 1000
    (Chris Dickinson) nodejs#1513
  - The REPL can be placed in to one of three modes using the NODE_REPL_MODE
    environment variable: sloppy, strict or magic (default); the new magic mode
    will automatically run "strict mode only" statements in strict mode
    (Chris Dickinson) nodejs#1513
* smalloc: the 'smalloc' module has been deprecated due to changes coming in V8
  4.4 that will render it unusable
* util: add Promise, Map and Set inspection support (Christopher Monsanto) nodejs#1471
* V8: upgrade to 4.2.77.18, see the ChangeLog for full details. Notable items:
  - Classes have moved out of staging; the class keyword is now usable in strict
    mode without flags
  - Object literal enhancements have moved out of staging; shorthand method and
    property syntax is now usable ({ method() { }, property })
  - Rest parameters (function(...args) {}) are implemented in staging behind the
    --harmony-rest-parameters flag
  - Computed property names ({['foo'+'bar']:'bam'}) are implemented in staging
    behind the --harmony-computed-property-names flag
  - Unicode escapes ('\u{xxxx}') are implemented in staging behind the
    --harmony_unicode flag and the --harmony_unicode_regexps flag for use in
    regular expressions
* Windows:
  - Random process termination on Windows fixed (Fedor Indutny) nodejs#1512 / nodejs#1563
  - The delay-load hook introduced to fix issues with process naming (iojs.exe /
    node.exe) has been made opt-out for native add-ons. Native add-ons should
    include 'win_delay_load_hook': 'false' in their binding.gyp to disable this
    feature if they experience problems . (Bert Belder) nodejs#1433
* Governance:
  - Rod Vagg (@rvagg) was added to the Technical Committee (TC)
  - Jeremiah Senkpiel (@Fishrock123) was added to the Technical Committee (TC)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants