ingydotnet / yaml-libyaml-pm

Perl Binding to libyaml
http://search.cpan.org/dist/YAML-LibYAML/
33 stars 37 forks source link

Changed include from <yaml.h> to "yaml.h" #97

Closed luyoutao closed 3 years ago

luyoutao commented 4 years ago

If yaml.h has been installed system-wide, conflicts will occur (see errors below).

api.c:810:19: error: conflicting types for 'yaml_alias_event_initialize'
yaml_alias_event_initialize(yaml_event_t *event, const yaml_char_t *anchor)
                  ^
/usr/local/include/yaml.h:555:1: note: previous declaration is here
yaml_alias_event_initialize(yaml_event_t *event, yaml_char_t *anchor);
^
api.c:834:1: error: conflicting types for 'yaml_scalar_event_initialize'
yaml_scalar_event_initialize(yaml_event_t *event,
^
/usr/local/include/yaml.h:580:1: note: previous declaration is here
yaml_scalar_event_initialize(yaml_event_t *event,
^
api.c:888:1: error: conflicting types for 'yaml_sequence_start_event_initialize'
yaml_sequence_start_event_initialize(yaml_event_t *event,
^
/usr/local/include/yaml.h:603:1: note: previous declaration is here
yaml_sequence_start_event_initialize(yaml_event_t *event,
^
api.c:943:1: error: conflicting types for 'yaml_mapping_start_event_initialize'
yaml_mapping_start_event_initialize(yaml_event_t *event,
^
/usr/local/include/yaml.h:635:1: note: previous declaration is here
yaml_mapping_start_event_initialize(yaml_event_t *event,
^
api.c:1208:1: error: conflicting types for 'yaml_document_add_scalar'
yaml_document_add_scalar(yaml_document_t *document,
^
/usr/local/include/yaml.h:898:1: note: previous declaration is here
yaml_document_add_scalar(yaml_document_t *document,
^
api.c:1258:1: error: conflicting types for 'yaml_document_add_sequence'
yaml_document_add_sequence(yaml_document_t *document,
^
/usr/local/include/yaml.h:915:1: note: previous declaration is here
yaml_document_add_sequence(yaml_document_t *document,
^
api.c:1303:1: error: conflicting types for 'yaml_document_add_mapping'
yaml_document_add_mapping(yaml_document_t *document,
^
/usr/local/include/yaml.h:931:1: note: previous declaration is here
yaml_document_add_mapping(yaml_document_t *document,
^
7 errors generated.
ingydotnet commented 3 years ago

The build for this adds -I. to the compiler commands, so the system headers should not affect the build.

I'd rather not change it as other systems including debian build from other libyaml sources, so this might break those.

afaik, this isn't causing problems for anyone else.

I know this pr is old but if you want to show the entire build logs, that might help find out why you got errors.

Closing for now.