Author Topic: Difficulties compiling 2.27 under OS X  (Read 1608 times)

Offline silenus

  • BFF
  • ***
  • Posts: 165
    • View Profile
Difficulties compiling 2.27 under OS X
« on: October 21, 2014, 11:19:18 AM »
I am having some difficulties getting fluffos to compile under OS X 10.10 Yosemite. There is a type error in the interpret.c code with LPC_INT and long being type incompatible and also a problem with posix timers since OS X doesnt have these (there is a problem with time_h not being defined out in the posix_timers.c). The last hurdle I have encountered is that libiconv isnt linking properly. Is there an older version of comm.c that lacks the fliconv hooks? Will the code work if I strip out the translate and get_translator calls?

Thanks in advance,

P.S. unfortunately my linux laptop died on me so I am not forced to use the mac for compiling fluff.

Offline FallenTree

  • BFF
  • ***
  • Posts: 482
    • View Profile
Re: Difficulties compiling 2.27 under OS X
« Reply #1 on: October 21, 2014, 03:37:00 PM »
please post full log.

None of them are big issues, but I don't have access to this environment, so fixing them purely through log can be hard.

Offline silenus

  • BFF
  • ***
  • Posts: 165
    • View Profile
Re: Difficulties compiling 2.27 under OS X
« Reply #2 on: October 23, 2014, 01:19:28 PM »
I get the following error during the link phase. I am not sure if I need to somehow find a way to locate libconv. I tried installing a new version of libconv with macports but this didn't do anything.:

gcc -std=c99 -D_GNU_SOURCE -m64 -flto -D__USE_FIXED_PROTOTYPES__ -O3 obj/grammar.tab.o obj/lex.o obj/main.o obj/rc.o obj/interpret.o obj/simulate.o obj/file.o obj/object.o obj/backend.o obj/array.o obj/mapping.o obj/comm.o obj/ed.o obj/regexp.o obj/buffer.o obj/crc32.o obj/malloc.o obj/mallocwrapper.o obj/class.o obj/efuns_main.o obj/efuns_port.o obj/call_out.o obj/otable.o obj/dumpstat.o obj/stralloc.o obj/hash.o obj/port.o obj/reclaim.o obj/parse.o obj/simul_efun.o obj/sprintf.o obj/program.o obj/compiler.o obj/avltree.o obj/icode.o obj/trees.o obj/generate.o obj/scratchpad.o obj/socket_efuns.o obj/socket_ctrl.o obj/qsort.o obj/eoperators.o obj/socket_err.o obj/md.o obj/disassembler.o obj/uvalarm.o obj/replace_program.o obj/master.o obj/function.o obj/debug.o obj/crypt.o obj/applies_table.o obj/add_action.o obj/eval.o obj/fliconv.o obj/console.o obj/posix_timers.o `./dtrace_compile` -o driver packages/packages.a  `cat system_libs`
undef: _iconv
undef: _iconv_open
Undefined symbols for architecture x86_64:
  "_iconv", referenced from:
      _translate in fliconv.o
  "_iconv_open", referenced from:
      _get_translator in fliconv.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]: *** [driver] Error 1
make: *** [main_build] Error 2

Offline FallenTree

  • BFF
  • ***
  • Posts: 482
    • View Profile
Re: Difficulties compiling 2.27 under OS X
« Reply #3 on: October 25, 2014, 12:44:33 PM »
typically you need to edit "system_libs"  for  -liconv , if you are installing with mac ports, you also need to add "-L <path>" to system_libs that points to where that library is.

But overall, I wouldn't recommend start with 2.27 anyway, why not just use 3.0?

Offline silenus

  • BFF
  • ***
  • Posts: 165
    • View Profile
Re: Difficulties compiling 2.27 under OS X
« Reply #4 on: October 26, 2014, 08:23:50 AM »
Thanks. It compiled but I haven't tested it yet(I made some other modifications to get it to compile one of which I am unsure of). I have been thinking of avoiding 3.0 because it is still in alpha. I was originally thinking of waiting until it reached gamma before switching and see what has changed.