Domanda

Building the latest Ruby on OSX fails:

../.././ext/psych/yaml/api.c:11:12: error: use of undeclared identifier 'YAML_VERSION_STRING'
    return YAML_VERSION_STRING;
           ^
../.././ext/psych/yaml/api.c:21:14: error: use of undeclared identifier 'YAML_VERSION_MAJOR'
    *major = YAML_VERSION_MAJOR;
             ^
../.././ext/psych/yaml/api.c:22:14: error: use of undeclared identifier 'YAML_VERSION_MINOR'
    *minor = YAML_VERSION_MINOR;
             ^
../.././ext/psych/yaml/api.c:23:14: error: use of undeclared identifier 'YAML_VERSION_PATCH'
    *patch = YAML_VERSION_PATCH;

Why is this the case? Isn't the source tested?

È stato utile?

Soluzione

This is fixed by adding #include "config.h" to ...yaml/api.c.

But then there arise other, different errors later.

I can't understand why incorrect source code is published by the ruby developers.

Edit with more information:

It seems that certain defines are missing (failure by configure?). The other errors were fixed by adding

#define HAVE_IFADDRS_H 1
#define HAVE_NET_IF_H 1

to ext/socket/rubysocket.h. After these fixes the compilation ran fine.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top