servalproject / serval-dna

The Serval Project's core daemon that implements Distributed Numbering Architecture (DNA), MDP, VoMP, Rhizome, MeshMS, etc.
http://servalproject.org
Other
171 stars 80 forks source link

serval-dna fails to compile on OS X #85

Closed TobiasWooldridge closed 10 years ago

TobiasWooldridge commented 10 years ago

Heya,

serval-dna has started failing to compile on OS X since the changes to commandline.c

I've tried changing section("commands") to section("DATA,commands") and updating all references to it to fit, but this didn't seem to work

Not sure how el

commandline.c:29:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(commandline_usage,CLIFLAG_PERMISSIVE_CONFIG,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
commandline.c:38:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(version_message,CLIFLAG_PERMISSIVE_CONFIG,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
keyring_cli.c:30:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_keyring_create, 0,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
keyring_cli.c:44:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_keyring_dump, 0,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
keyring_cli.c:74:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_keyring_load, 0,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
keyring_cli.c:120:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_keyring_list, 0,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
keyring_cli.c:199:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_keyring_add, 0,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
conf_cli.c:29:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_config_schema, CLIFLAG_PERMISSIVE_CONFIG,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
conf_cli.c:51:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_config_dump, CLIFLAG_PERMISSIVE_CONFIG,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
conf_cli.c:105:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_config_set, CLIFLAG_PERMISSIVE_CONFIG,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
conf_cli.c:108:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_config_set, CLIFLAG_PERMISSIVE_CONFIG,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
conf_cli.c:111:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_config_set, CLIFLAG_PERMISSIVE_CONFIG,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
conf_cli.c:198:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_config_get, CLIFLAG_PERMISSIVE_CONFIG,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
conf_cli.c:232:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_config_paths, CLIFLAG_PERMISSIVE_CONFIG,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
7 errors generated.
make: *** [objs_servald/conf_cli.o] Error 1
make: *** Waiting for unfinished jobs....
rhizome_cli.c:86:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_rhizome_hash_file, 0,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
rhizome_cli.c:105:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_rhizome_add_file, 0,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
rhizome_cli.c:108:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_rhizome_add_file, 0,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
commandline.c:517:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_echo,CLIFLAG_PERMISSIVE_CONFIG,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
commandline.c:541:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_log,CLIFLAG_PERMISSIVE_CONFIG,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
commandline.c:595:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_dna_lookup, 0,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
commandline.c:725:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_reverse_lookup, 0,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
rhizome_cli.c:309:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_rhizome_import_bundle, 0,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
6 errors generated.
rhizome_cli.c:346:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_rhizome_append_manifest, 0,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
rhizome_cli.c:372:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_rhizome_delete, 0,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
rhizome_make: *** [objs_servald/commandline.o] Error 1
keyring_cli.c:235:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_keyring_set_did, 0,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
keyring_cli.c:283:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_keyring_set_tag, 0,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
keyring_cli.c:386:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_revoke_pin, 0,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
keyring_cli.c:389:1: error: cli.c:375:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_rhizome_delete, 0,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
rhizome_cli.c:437:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_rhizome_clean, 0,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
rhizome_cli.c:468:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_rhizome_extract, 0,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
rhizome_cli.c:472:1: erroargument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_revoke_pin, 0,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
keyring_cli.c:397:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_id_pin, 0,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
keyring_cli.c:405:1: error: argument to 'section' attribute is not valid ftest_cli.c:27:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_byteorder_test, 0,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
test_cli.c:46:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_crypt_test, 0,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
r: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_rhizome_extract, 0,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
rhizome_cli.c:476:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_rhizome_extract, 0,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
rhizome_cli.c:480:1: error: argument to 'section' attribuor this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_id_list, 0,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
te is not    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
valid                                                         ^for
 this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_rhizome_extract, 0,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
11 errors generated.
rhizome_cli.c:596:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_rhizome_export_file, 0,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
rhizome_cli.c:639:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_rhizome_list, 0,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
make: *** [objs_servald/keyring_cli.o] Error 1
14 errors generated.
make: *** [objs_servald/rhizome_cli.o] Error 1
network_cli.c:31:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_mdp_ping, 0,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
test_cli.c:209:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_mem_test, 0,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
3 errors generated.
network_cli.c:254:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_trace, 0,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
network_cli.c:330:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_id_self, 0,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
make: *** [objs_servald/test_cli.o] Error 1
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
network_cli.c:393:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_count_peers, 0,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
network_cli.c:421:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_route_print, 0,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
network_cli.c:493:1: error: argument to 'section' attribute is not valid for this target: mach-o
      section specifier requires a segment and section separated by a comma
DEFINE_CMD(app_network_scan, 0,
^
./commandline.h:36:57: note: expanded from macro 'DEFINE_CMD'
    __attribute__((used,aligned(sizeof(void *)),section("commands"))) = {\
                                                        ^
6 errors generated.
make: *** [objs_servald/network_cli.o] Error 1
lakeman commented 10 years ago

The issue is in commandline.h where we are attempting to link a custom section into the binary. We may be able to fix it like this with some platform specific macros; http://stackoverflow.com/a/22366882