1

Mac OS X 10.9.x Mavericks に NS-2 をインストールしようとしていますns-allinone

インストール スクリプトを実行するたびに、Otcl をインストールするステップでエラーが発生して失敗します。

rm -f libotcl otcl.o so_locations
gcc -c -g -O2 -DNDEBUG -DUSE_SHM -DHAVE_UNISTD_H=1 -fPIC -I. -I/Users/songsong/Downloads/ns-allinone-2.35/include -I/Users/songsong/Downloads/ns-allinone-2.35/include -I/Users/songsong/Downloads/ns-allinone-2.35/include -I/usr/X11R6/include -I/include  otcl.c
otcl.c:784:14: warning: cast to 'Proc *' (aka 'struct Proc *') from smaller
      integer type 'int' [-Wint-to-pointer-cast]
      return Tcl_CmdInfoGetProc(co);
             ^
otcl.c:74:32: note: expanded from macro 'Tcl_CmdInfoGetProc'
#define Tcl_CmdInfoGetProc(co) (Proc *)(co->isNativeObjectProc) ? co->ob...
                               ^
1 warning generated.
o libotcl otcl.o
make: o: No such file or directory
make: [libotcl] Error 1 (ignored)
rm -f libotcl
gcc -o otclsh  -g -O2 -I. -I/Users/songsong/Downloads/ns-allinone-2.35/include -I/Users/songsong/Downloads/ns-allinone-2.35/include -I/Users/songsong/Downloads/ns-allinone-2.35/include -I/usr/X11R6/include -I/include  otclAppInit.c \
    -L. -lotcl -L/Users/songsong/Downloads/ns-allinone-2.35/lib -ltk8.5 -L/Users/songsong/Downloads/ns-allinone-2.35/lib -ltcl8.5 -L/usr/X11R6/lib -lXext -lX11  -lm
Undefined symbols for architecture x86_64:
  "_CFAbsoluteTimeGetCurrent", referenced from:
      _Tcl_SetTimer in libtcl8.5.a(tclMacOSXNotify.o)
      _Tcl_ServiceModeHook in libtcl8.5.a(tclMacOSXNotify.o)
      _Tcl_Sleep in libtcl8.5.a(tclMacOSXNotify.o)
  "_CFBundleCopyBundleURL", referenced from:
      _Tcl_MacOSXOpenVersionedBundleResources in libtcl8.5.a(tclMacOSXBundle.o)
  "_CFBundleCopyResourceURL", referenced from:
      _Tcl_MacOSXOpenVersionedBundleResources in libtcl8.5.a(tclMacOSXBundle.o)
  "_CFBundleCreate", referenced from:
      _Tcl_MacOSXOpenVersionedBundleResources in libtcl8.5.a(tclMacOSXBundle.o)
  "_CFBundleGetBundleWithIdentifier", referenced from:
      _Tcl_MacOSXOpenVersionedBundleResources in libtcl8.5.a(tclMacOSXBundle.o)
  "_CFLocaleCopyCurrent", referenced from:
      _TclpSetVariables in libtcl8.5.a(tclUnixInit.o)
  "_CFLocaleGetIdentifier", referenced from:
      _TclpSetVariables in libtcl8.5.a(tclUnixInit.o)
  "_CFRelease", referenced from:
      _Tcl_FinalizeNotifier in libtcl8.5.a(tclMacOSXNotify.o)
      _TclpSetVariables in libtcl8.5.a(tclUnixInit.o)
      _Tcl_MacOSXOpenVersionedBundleResources in libtcl8.5.a(tclMacOSXBundle.o)
  "_CFRunLoopAddObserver", referenced from:
      _Tcl_InitNotifier in libtcl8.5.a(tclMacOSXNotify.o)
      _TclMacOSXNotifierAddRunLoopMode in libtcl8.5.a(tclMacOSXNotify.o)
  "_CFRunLoopAddSource", referenced from:
      _Tcl_InitNotifier in libtcl8.5.a(tclMacOSXNotify.o)
      _TclMacOSXNotifierAddRunLoopMode in libtcl8.5.a(tclMacOSXNotify.o)
  "_CFRunLoopAddTimer", referenced from:
      _TclMacOSXNotifierAddRunLoopMode in libtcl8.5.a(tclMacOSXNotify.o)
      _Tcl_ServiceModeHook in libtcl8.5.a(tclMacOSXNotify.o)
  "_CFRunLoopGetCurrent", referenced from:
      _Tcl_InitNotifier in libtcl8.5.a(tclMacOSXNotify.o)
  "_CFRunLoopObserverCreate", referenced from:
      _Tcl_InitNotifier in libtcl8.5.a(tclMacOSXNotify.o)
  "_CFRunLoopObserverInvalidate", referenced from:
      _Tcl_FinalizeNotifier in libtcl8.5.a(tclMacOSXNotify.o)
  "_CFRunLoopRunInMode", referenced from:
      _Tcl_WaitForEvent in libtcl8.5.a(tclMacOSXNotify.o)
      _Tcl_Sleep in libtcl8.5.a(tclMacOSXNotify.o)
  "_CFRunLoopSourceCreate", referenced from:
      _Tcl_InitNotifier in libtcl8.5.a(tclMacOSXNotify.o)
  "_CFRunLoopSourceInvalidate", referenced from:
      _Tcl_FinalizeNotifier in libtcl8.5.a(tclMacOSXNotify.o)
  "_CFRunLoopSourceSignal", referenced from:
      _Tcl_AlertNotifier in libtcl8.5.a(tclMacOSXNotify.o)
      _NotifierThreadProc in libtcl8.5.a(tclMacOSXNotify.o)
  "_CFRunLoopTimerCreate", referenced from:
      _Tcl_ServiceModeHook in libtcl8.5.a(tclMacOSXNotify.o)
  "_CFRunLoopTimerGetNextFireDate", referenced from:
      _Tcl_Sleep in libtcl8.5.a(tclMacOSXNotify.o)
  "_CFRunLoopTimerInvalidate", referenced from:
      _Tcl_FinalizeNotifier in libtcl8.5.a(tclMacOSXNotify.o)
  "_CFRunLoopTimerSetNextFireDate", referenced from:
      _Tcl_SetTimer in libtcl8.5.a(tclMacOSXNotify.o)
      _Tcl_Sleep in libtcl8.5.a(tclMacOSXNotify.o)
  "_CFRunLoopWakeUp", referenced from:
      _Tcl_AlertNotifier in libtcl8.5.a(tclMacOSXNotify.o)
      _NotifierThreadProc in libtcl8.5.a(tclMacOSXNotify.o)
  "_CFStringCompare", referenced from:
      _Tcl_MacOSXOpenVersionedBundleResources in libtcl8.5.a(tclMacOSXBundle.o)
  "_CFStringCreateWithCString", referenced from:
      _Tcl_MacOSXOpenVersionedBundleResources in libtcl8.5.a(tclMacOSXBundle.o)
  "_CFStringGetCString", referenced from:
      _TclpSetVariables in libtcl8.5.a(tclUnixInit.o)
  "_CFURLCopyLastPathComponent", referenced from:
      _Tcl_MacOSXOpenVersionedBundleResources in libtcl8.5.a(tclMacOSXBundle.o)
  "_CFURLCreateCopyAppendingPathComponent", referenced from:
      _Tcl_MacOSXOpenVersionedBundleResources in libtcl8.5.a(tclMacOSXBundle.o)
  "_CFURLGetFileSystemRepresentation", referenced from:
      _Tcl_MacOSXOpenVersionedBundleResources in libtcl8.5.a(tclMacOSXBundle.o)
  "___CFConstantStringClassReference", referenced from:
      CFString in libtcl8.5.a(tclMacOSXNotify.o)
      CFString in libtcl8.5.a(tclMacOSXBundle.o)
      CFString in libtcl8.5.a(tclMacOSXBundle.o)
  "_kCFRunLoopCommonModes", referenced from:
      _Tcl_InitNotifier in libtcl8.5.a(tclMacOSXNotify.o)
      _Tcl_ServiceModeHook in libtcl8.5.a(tclMacOSXNotify.o)
  "_kCFRunLoopDefaultMode", referenced from:
      _Tcl_WaitForEvent in libtcl8.5.a(tclMacOSXNotify.o)
      _Tcl_Sleep in libtcl8.5.a(tclMacOSXNotify.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: *** [otclsh] Error 1
4

2 に答える 2

2

CF_CF*物事がCoreFoundation Framework(Xcodeの一部である可能性があります)を意味し、インストーラーがそれを認識しないことを発見しました。

したがって、私-framework CoreFoundation$CFLAGSMakefile

./configureの前に実行するとmakeMakefileが変更され、変更内容が失われます。その場合は in にCFLAGS="-g -O2"置き換えCFLAGS="-g -O2 -framework CoreFoundation"ます./configure

于 2014-01-15T04:27:06.170 に答える
2

configure exeファイルのotclディレクトリで、これを変更します

if test "$GCC" = yes; then CFLAGS="-g -O2"

これに

if test "$GCC" = yes; then CFLAGS="-g -O2 -framework CoreFoundation"
于 2016-10-03T18:25:04.280 に答える