Macports Reduce build

Ryan Schmidt ryandesign at macports.org
Mon Sep 24 01:16:37 UTC 2018


It doesn't build for me...


Undefined symbols for architecture x86_64:
  "directoryp(char*, char const*, unsigned long)", referenced from:
      Ldirectoryp(long, long) in csl-print.o
  "fwin_menus(char**, char**, void (*)())", referenced from:
      cslstart(int, char const**, int (*)(int)) in csl-csl.o
  "delete_file(char*, char const*, unsigned long)", referenced from:
      Lopen(long, long, long) in csl-print.o
      Ldelete_file(long, long) in csl-print.o
  "file_exists(char*, char const*, unsigned long, char*)", referenced from:
      Lfiledate(long, long) in csl-print.o
      CSLtmpnam(char const*, unsigned long) in csl-sysfwin.o
  "file_length(char*, char const*, unsigned long)", referenced from:
      Lfile_length(long, long) in csl-print.o
  "rename_file(char*, char const*, unsigned long, char*, char const*, unsigned long)", referenced from:
      Lopen(long, long, long) in csl-print.o
      Lrename_file(long, long, long) in csl-print.o
  "fwin_getchar()", referenced from:
      wimpget(char*) in csl-sysfwin.o
  "fwin_putchar(int)", referenced from:
      char_to_terminal(int, long) in csl-print.o
  "fwin_restore()", referenced from:
      cslstart(int, char const**, int (*)(int)) in csl-csl.o
  "fwin_startup(int, char const**, int (*)(int, char const**))", referenced from:
      _main in csl-csl.o
  "get_truename(char*, char const*, unsigned long)", referenced from:
      Ltruename(long, long) in csl-print.o
  "file_readable(char*, char const*, unsigned long)", referenced from:
      Lfile_readable(long, long) in csl-print.o
  "fwin_showmath(char const*)", referenced from:
      Lmath_display(long, long) in csl-print.o
  "truncate_file(__sFILE*, long)", referenced from:
      finished_with(int) in csl-preserve.o
  "file_writeable(char*, char const*, unsigned long)", referenced from:
      Lfile_writeable(long, long) in csl-print.o
  "scan_directory(char const*, void (*)(char const*, int, long))", referenced from:
      list_one_library(long, bool) in csl-preserve.o
      Llibrary_members(long, long) in csl-preserve.o
  "delete_wildcard(char*, char const*, unsigned long)", referenced from:
      Ldelete_wildcard(long, long) in csl-print.o
  "fwin_report_mid(char const*)", referenced from:
      Lwindow_heading2(long, long, long) in csl-print.o
  "fwin_set_lookup(char* (*)(char*, int))", referenced from:
      _main in csl-csl.o
  "fwin_set_prompt(char const*)", referenced from:
      interrupted(long) in csl-csl.o
      Lsetpchar(long, long) in csl-fasl.o
  "fwin_windowmode()", referenced from:
      set_up_variables(int) in csl-restart.o
      interrupted(long) in csl-csl.o
  "change_directory(char*, char const*, unsigned long)", referenced from:
      Lchange_directory(long, long) in csl-print.o
  "create_directory(char*, char const*, unsigned long)", referenced from:
      Lcreate_directory(long, long) in csl-print.o
  "fwin_report_left(char const*)", referenced from:
      Lwindow_heading2(long, long, long) in csl-print.o
      report_time(int, int) in csl-sysfwin.o
  "fwin_report_right(char const*)", referenced from:
      Lwindow_heading2(long, long, long) in csl-print.o
      report_space(unsigned long long, double, double) in csl-sysfwin.o
  "process_file_name(char*, char const*, unsigned long)", referenced from:
      open_pds(char const*, int) in csl-preserve.o
  "fwin_ensure_screen()", referenced from:
      ensure_screen() in csl-print.o
      write_action_terminal(int, long) in csl-print.o
      prin_to_terminal(long) in csl-print.o
      prin_to_stdout(long) in csl-print.o
      prin_to_error(long) in csl-print.o
      prin_to_trace(long) in csl-print.o
      prinhex_to_trace(char const*, long) in csl-print.o
      ...
  "fwin_set_help_file(char const*, char const*)", referenced from:
      Lset_help_file(long, long, long) in csl-fasl.o
  "get_home_directory(char*, unsigned long)", referenced from:
      Luser_homedir_pathname(long) in csl-print.o
  "fwin_acknowledge_tick()", referenced from:
      reclaim(long, char const*, int, unsigned long) in csl-cslgc.o
  "fwin_refresh_switches(char**, char**)", referenced from:
      review_switch_settings() in csl-restart.o
  "get_current_directory(char*, unsigned long)", referenced from:
      Lget_current_directory(long) in csl-print.o
      cslstart(int, char const**, int (*)(int)) in csl-csl.o
  "list_directory_members(char*, char const*, unsigned long, void (*)(char const*, int, long))", referenced from:
      Llist_directory(long, long) in csl-print.o
  "fwin_callback_to_interrupt(int (*)(int))", referenced from:
      cslstart(int, char const**, int (*)(int)) in csl-csl.o
  "Cmkdir(char const*)", referenced from:
      open_pds(char const*, int) in csl-preserve.o
      unpending(directory*) in csl-preserve.o
  "my_getenv(char const*)", referenced from:
      Lgetenv(long, long) in csl-cslread.o
  "my_system(char const*)", referenced from:
      Lsystem(long, long) in csl-cslread.o
  "open_file(char*, char const*, unsigned long, char const*, __sFILE*)", referenced from:
      Lopen(long, long, long) in csl-print.o
      Lopen_url(long, long) in csl-print.o
      Lbinary_open_output(long, long) in csl-print.o
      Lbinary_open_input(long, long) in csl-print.o
      Lspool(long, long) in csl-cslread.o
      cslstart(int, char const**, int (*)(int)) in csl-csl.o
      cslaction() in csl-csl.o
      ...
  "FX::text", referenced from:
      Lmath_display(long, long) in csl-print.o
  "_about_box_description", referenced from:
      set_up_variables(int) in csl-restart.o
      fwin_main(int, char const**) in csl-csl.o
  "_about_box_rights_1", referenced from:
      set_up_variables(int) in csl-restart.o
  "_about_box_rights_2", referenced from:
      set_up_variables(int) in csl-restart.o
  "_about_box_title", referenced from:
      set_up_variables(int) in csl-restart.o
      fwin_main(int, char const**) in csl-csl.o
  "_fullProgramName", referenced from:
      set_up_variables(int) in csl-restart.o
  "_fwin_linelength", referenced from:
      write_action_terminal(int, long) in csl-print.o
      write_action_spool(int, long) in csl-print.o
  "_fwin_pause_at_end", referenced from:
      cslstart(int, char const**, int (*)(int)) in csl-csl.o
  "_fwin_use_xft", referenced from:
      cslstart(int, char const**, int (*)(int)) in csl-csl.o
  "_programDir", referenced from:
      find_image_directory(int, char const**) in csl-sysfwin.o
      find_gnuplot(char*) in csl-sysfwin.o
  "_programName", referenced from:
      set_up_variables(int) in csl-restart.o
      find_image_directory(int, char const**) in csl-sysfwin.o
  "_scan_leafstart", referenced from:
      make_dir_list(char const*, int, long) in csl-print.o
  "_showmathInitialised", referenced from:
      set_up_variables(int) in csl-restart.o
  "_texmacs_mode", referenced from:
      set_up_variables(int) in csl-restart.o
      setup(int, double) in csl-restart.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[3]: *** [Makefile:4796: csl] Error 1
make[2]: *** [all] Error 2


But I guess the options are:

a) Figure out where in the code it calls the gnuplot executable, and change it to be the absolute path, so that the $PATH variable is not needed. I found lines such as these:

./packages/plot/gnuintfc.red:   plotcommand!* := find!-gnuplot();
./packages/plot/gnuintfc.red:     plotcommand!* := find!-gnuplot();
./packages/plot/gnuintfc.red:   plotcommand!* := bldmsg("gnuplot %w",plotcmds!*);
./packages/plot/gnuintfc.red:  plotcommand!* := find!-gnuplot();

Maybe using the full "/opt/local/bin/gnuplot" on these lines is the answer.

b) Rename or move the real executable and in its place put a wrapper script that sets $PATH and then calls the original executable.





More information about the macports-dev mailing list