- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
is valid only in a c99 compilation environment." 上构建 Node.JS-6ren"> is valid only in a c99 compilation environment." 上构建 Node.JS-我正在尝试在 Solaris 上安装 Node.JS。这是开箱即用的 Solaris 9/10 x86(最新的是 2010 年 9 月)并且仅使用默认包。 我遵循的指示在这里:https://gith-6ren">
我正在尝试在 Solaris 上安装 Node.JS。这是开箱即用的 Solaris 9/10 x86(最新的是 2010 年 9 月)并且仅使用默认包。
我遵循的指示在这里:https://github.com/joyent/node/wiki/Installation .我正在使用在他们的主页上找到的最新稳定版本的 Node.JS http://nodejs.org
这是我试过的...
-bash-3.00# export PATH=$PATH:/usr/sfw/bin:/usr/xpg4/bin
-bash-3.00# ./configure --prefix=/tmp/node
Checking for program g++ or c++ : /usr/sfw/bin/g++
Checking for program cpp : /usr/sfw/bin/cpp
Checking for program ar : /usr/xpg4/bin/ar
Checking for program ranlib : not found
Checking for g++ : ok
Checking for program gcc or cc : /usr/sfw/bin/gcc
Checking for program ar : /usr/xpg4/bin/ar
Checking for program ranlib : not found
Checking for gcc : ok
Checking for library dl : yes
Checking for openssl : yes
Checking for library util : not found
Checking for library rt : yes
Checking for library socket : yes
Checking for library nsl : yes
--- libeio ---
Checking for library pthread : yes
Checking for function pthread_create : yes
Checking for function pthread_atfork : yes
Checking for futimes(2) : no
Checking for readahead(2) : no
Checking for fdatasync(2) : no
Checking for pread(2) and pwrite(2) : yes
Checking for sendfile(2) : no
Checking for sync_file_range(2) : no
--- libev ---
Checking for header sys/inotify.h : not found
Checking for header sys/epoll.h : not found
Checking for header port.h : yes
Checking for function port_create : yes
Checking for header poll.h : yes
Checking for function poll : yes
Checking for header sys/event.h : not found
Checking for header sys/queue.h : yes
Checking for function kqueue : not found
Checking for header sys/select.h : yes
Checking for function select : yes
Checking for header sys/eventfd.h : not found
Checking for SYS_clock_gettime : no
Checking for library rt : yes
Checking for function clock_gettime : yes
Checking for function nanosleep : yes
Checking for function ceil : yes
Checking for fdatasync(2) with c++ : no
'configure' finished successfully (1.936s)
-bash-3.00# make
Waf: Entering directory `/tmp/node-v0.4.3/build'
DEST_OS: sunos
DEST_CPU: ia32
Parallel Jobs: 1
Product type: program
[ 3/75] cc: deps/c-ares/ares_strcasecmp.c -> build/default/deps/c-ares/ares_strcasecmp_1.o
/usr/sfw/bin/gcc -D_GNU_SOURCE -DHAVE_CONFIG_H=1 -threads -m32 -g -O3 -DHAVE_OPENSSL=1 -DEV_FORK_ENABLE=0 -DEV_EMBED_ENABLE=0 -DEV_MULTIPLICITY=0 -DX_STACKSIZE=65536 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DEV_MULTIPLICITY=0 -DHAVE_FDATASYNC=0 -DPLATFORM="sunos" -D__POSIX__=1 -Wno-unused-parameter -D_FORTIFY_SOURCE=2 -DNDEBUG -Idefault/deps/c-ares -I../deps/c-ares -Idefault/deps/c-ares/sunos-ia32 -I../deps/c-ares/sunos-ia32 ../deps/c-ares/ares_strcasecmp.c -c -o default/deps/c-ares/ares_strcasecmp_1.o
In file included from ../deps/c-ares/setup_once.h:73,
from ../deps/c-ares/sunos-ia32/ares_setup.h:195,
from ../deps/c-ares/ares_strcasecmp.c:18:
/usr/include/stdbool.h:42:2: #error "Use of <stdbool.h> is valid only in a c99 compilation environment."
Waf: Leaving directory `/tmp/node-v0.4.3/build'
Build failed: -> task failed (err #1):
{task: cc ares_strcasecmp.c -> ares_strcasecmp_1.o}
*** Error code 1
The following command caused the error:
python tools/waf-light --product-type=program build
make: Fatal error: Command failed for target `program'
-bash-3.00#
我认为关键错误是
/usr/include/stdbool.h:42:2: #error "Use of <stdbool.h> is valid only in a c99 compilation environment."
我可以这样重现
-bash-3.00# cd build
-bash-3.00# /usr/sfw/bin/gcc -D_GNU_SOURCE -DHAVE_CONFIG_H=1 -threads -m32 -g -O3 -DHAVE_OPENSSL=1 -DEV_FORK_ENABLE=0 -DEV_EMBED_ENABLE=0 -DEV_MULTIPLICITY=0 -DX_STACKSIZE=65536 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DEV_MULTIPLICITY=0 -DHAVE_FDATASYNC=0 -DPLATFORM="sunos" -D__POSIX__=1 -Wno-unused-parameter -D_FORTIFY_SOURCE=2 -DNDEBUG -Idefault/deps/c-ares -I../deps/c-ares -Idefault/deps/c-ares/sunos-ia32 -I../deps/c-ares/sunos-ia32 ../deps/c-ares/ares_strcasecmp.c -c -o default/deps/c-ares/ares_strcasecmp_1.o
In file included from ../deps/c-ares/setup_once.h:73,
from ../deps/c-ares/sunos-ia32/ares_setup.h:195,
from ../deps/c-ares/ares_strcasecmp.c:18:
/usr/include/stdbool.h:42:2: #error "Use of <stdbool.h> is valid only in a c99 compilation environment."
-bash-3.00# cd ..
-bash-3.00#
有什么想法吗?我是否需要指定不同的选项来使用 C99 或不使用 C99?
同样,这是开箱即用的 x86 上的 Solaris 9/10。我没有做任何会改变任何编译器或与此相关的任何其他默认安装的东西。
最佳答案
在调用 ./configure
之前尝试将 -std=c99
或 -std=gnu99
添加到您的 CFLAGS
,像这样:
CFLAGS=-std=c99 ./configure --prefix=/tmp/node
这个错误意味着 Node.JS 可能在它的 configure.ac
脚本中使用了 AC_PROG_CC
而它应该使用 AC_PROG_CC_C99
,见 the page on C compiler detection on autoconf's manual .您应该向 Node.JS 开发人员报告此错误,并测试正确的解决方案是否适用于您的系统。
关于c - 在 Solaris : "Use of <stdbool.h> is valid only in a c99 compilation environment." 上构建 Node.JS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5363042/
当我尝试输入时,我正在关注 Ray Wenderlich ( https://videos.raywenderlich.com/screencasts/545-server-side-swift-wi
我正在使用 javax.validation.Validation 来验证 jpa 实体。我总是针对相同的实体进行验证。 我想知道是对所有验证使用一个 validator 更好,还是每次验证时实例化一
Controller : @RequestMapping(...) public void foo(@Valid Parent p){ } class Parent { @NotNull // j
在 login.phtml 中,validator 和 validate 之间有什么区别 - 有人可以解释下面每一行的含义 function onepageLogin(button)
我有一个 java bean 用于将 JSON 消息发送到 spring @RestController 并且我有 bean 验证设置并使用 @Valid 运行得很好。但我想转移到 Protobuf/
我正在使用 vee-validate 来验证注册表单,我编写了如下代码,
使用 有什么区别属性和 标签? 我应该什么时候使用哪一种? 最佳答案 validator属性允许您引用独立的托管 bean 方法,而不仅仅是像这样的验证器
我们有这个 Alamofire 错误处理: Alamofire.request(.GET, getUrl("mystuff")).responseData { response in guar
以下代码创建了两个单选按钮。每个选项都包含一个日期值,该日期值已成功转换为格式为“yyyy-MM-dd”的标签。一旦我做出选择并单击下一步按钮,我就会收到以下错误“j_idt12:comDateCho
是否有类似的验证: req.checkBody('property', 'should be present').isPresent(); 值本身并不重要。 现在我使用这个解决方案: .isLengt
系列文章: 1、async-validator 源码学习(一):文档翻译 2、async-validator 源码学习笔记(二):目录结构 3、async-validator 源码学习笔记(三):ru
我正在使用 Backbone.Validation插入。我有一个模型可以在服务器端进行唯一性检查。我如何让 backbone.validation 识别错误并运行我设置的回调以显示返回的错误消息? t
我有一个 Knockout.Validation 场景,我认为该场景相当普遍,但尚未通过在网络上搜索和本网站上的各种答案找到解决方案。 我正在验证的属性在 ajax 调用之后才会添加到可观察到的 kn
我是 Knockout JS 的新手。我需要一个验证器来验证用户将在文本框中输入的日期。为此编写了如下代码 ko.validation.rules['date'] = { validator:
如何在 JSF 验证器中比较两个字符串是否相等? if (!settingsBean.getNewPassword().equals(settingsBean.getConfirmPassword()
我有简单的域: package app class Customers { String CUSTOMER String NOTE static mapping = {
我正在使用 ember-validations 来验证表单中的模型。 如果我使用 createRecord 创建记录,则模型的实例已经过验证,因此在用户输入值之前表单已经显示验证错误。 我只想在提交表
我有两种不同的服务:第一个是将对象保存到数据库,第二个是更新现有对象。 我正在对我的对象使用验证约束,例如(@NotBlank、@Size、@Pattern 等),在第一种情况下,我需要验证对象的所有
我有 2 个 ensure - 验证装饰器用于 2 个字段:password 和 retypePassword。我想在填写 retypePassword 字段时检查这两个字段是否相等。 问题是,当我在
I'm aware that it's a bug ,但是在域类上调用 validate() 会覆盖之前放入的任何拒绝: def save = { def assignment = new A
我是一名优秀的程序员,十分优秀!