citus icon indicating copy to clipboard operation
citus copied to clipboard

Undefined symbols for architecture arm64 when compiling

Open naisila opened this issue 1 year ago • 1 comments

I'm seeing a different issue compiling this branch on arm64/MacOS than I do on main against 16 (neither work, so this isn't a regression):

Against 17 (this branch):

Undefined symbols for architecture arm64:
  "_deparse_shard_query", referenced from:
      _GenerateTaskListWithColocatedIntermediateResults in repartition_executor.o
      _GenerateTaskListWithRedistributedResults in repartition_executor.o
      _DeparseTaskQuery in deparse_shard_query.o
      _CreateInsertSelectPlan in insert_select_planner.o
      _CacheLocalPlanForShardQuery in local_plan_cache.o
      _deparse_shard_query_test in deparse_shard_query.o
  "_generate_operator_name", referenced from:
      _GetFunctionDDLCommand in function.o
  "_generate_relation_name", referenced from:
      _PreprocessGrantStmt in grant.o
      _PreprocessAlterPolicyStmt in policy.o
      _pg_get_tableschemadef_string in citus_ruleutils.o
      _pg_get_tablecolumnoptionsdef_string in citus_ruleutils.o
      _pg_get_table_grants in citus_ruleutils.o
  "_getOwnedSequences_internal", referenced from:
      _ConvertTable in alter_table.o
      _ExtractDefaultColumnsAndOwnedSequences in sequence.o
  "_get_merged_argument_list", referenced from:
      _CallDistributedProcedureRemotely in call.o
  "_pg_get_query_def", referenced from:
      _BuildSelectStatementViaStdPlanner in combine_query_planner.o
      _DeparseTaskQuery in deparse_shard_query.o
      _CacheLocalPlanForShardQuery in local_plan_cache.o
      _CreatePhysicalDistributedPlan in multi_physical_planner.o
      _QueryPushdownSqlTaskList in multi_physical_planner.o
      _GenerateSubplansForSubqueriesAndCTEs in recursive_planning.o
      _RecursivelyPlanSubqueriesAndCTEs in recursive_planning.o
      ...
  "_pg_get_rule_expr", referenced from:
      _CallDistributedProcedureRemotely in call.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [citus.dylib] Error 1
make: *** [extension] Error 2

Main against 16

ld: warning: ignoring file '/opt/local/lib/libcurl.4.dylib': found architecture 'arm64', required architecture 'x86_64'
Undefined symbols for architecture x86_64:
  "_curl_easy_cleanup", referenced from:
      _CollectBasicUsageStatistics in statistics_collection.o
  "_curl_easy_getinfo", referenced from:
      _CollectBasicUsageStatistics in statistics_collection.o
  "_curl_easy_init", referenced from:
      _CollectBasicUsageStatistics in statistics_collection.o
  "_curl_easy_perform", referenced from:
      _CollectBasicUsageStatistics in statistics_collection.o
  "_curl_easy_setopt", referenced from:
      _CollectBasicUsageStatistics in statistics_collection.o
      _CollectBasicUsageStatistics in statistics_collection.o
      _CollectBasicUsageStatistics in statistics_collection.o
      _CollectBasicUsageStatistics in statistics_collection.o
      _CollectBasicUsageStatistics in statistics_collection.o
  "_curl_easy_strerror", referenced from:
      _CollectBasicUsageStatistics in statistics_collection.o
  "_curl_global_cleanup", referenced from:
      _CollectBasicUsageStatistics in statistics_collection.o
  "_curl_global_init", referenced from:
      _CollectBasicUsageStatistics in statistics_collection.o
  "_curl_slist_append", referenced from:
      _CollectBasicUsageStatistics in statistics_collection.o
      _CollectBasicUsageStatistics in statistics_collection.o
      _CollectBasicUsageStatistics in statistics_collection.o
  "_curl_slist_free_all", referenced from:
      _CollectBasicUsageStatistics in statistics_collection.o
  "_curl_version_info", referenced from:
      _WarnIfSyncDNS in statistics_collection.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [citus.dylib] Error 1
make: *** [extension] Error 2

Originally posted by @jmealo in https://github.com/citusdata/citus/issues/7699#issuecomment-2400598600

naisila avatar Oct 16 '24 19:10 naisila

@alperkocatas , @codeforall could you please give this a try with main branch (pg17 support branch is now merged with main) when you have a chance.

ihalatci avatar May 03 '25 07:05 ihalatci