iraf-community / x11iraf

X11/GUI utilities and applications for IRAF (xgterm, ximtool, xtapemon)
https://iraf-community.github.io/x11iraf
21 stars 8 forks source link

Problem With X11iraf #46

Closed sctegler closed 2 years ago

sctegler commented 2 years ago

Hi,

I was able to install IRAF on my iMac running Big Sur; however, when I try to install X11iraf I got the following errors. I would greatly appreciate your help.

bash-3.2$ sudo CFLAGS=-Wno-error=implicit-function-declaration make install
Password:
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C xgterm
cc -L/usr/X11/lib -o xgterm button.o charproc.o cursor.o data.o gtermio.o input.o main.o menu.o misc.o screen.o scrollbar.o tabs.o util.o VTPrsTbl.o \
           -L../obm -lobm \
           -lXpm -ltcl -lXaw3d -lXmu -lXt -lXext -lX11 -lncurses -lm
Undefined symbols for architecture x86_64:
  "_Tcl_GetErrorLine", referenced from:
      _ObmDeliverMsg in libobm.a(Obm.o)
      _obm_call_activate_callbacks in libobm.a(Obm.o)
      _gtermInputCallback in libobm.a(gterm.o)
      _gtermResizeCallback in libobm.a(gterm.o)
      _gtermResetCallback in libobm.a(gterm.o)
      _cb_error in libobm.a(html.o)
      _MarkerEvaluate in libobm.a(marker.o)
      ...
  "_Tcl_SetErrorLine", referenced from:
      _MarkerEvaluate in libobm.a(marker.o)
      _ParameterEvaluate in libobm.a(param.o)
      _WidgetEvaluate in libobm.a(widget.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]: *** [xgterm] Error 1
make: *** [xgterm] Error 2
bash-3.2$ 
olebole commented 2 years ago

This usually happens when the header for Tcl do not match the linked library. For example, when you have (I think) Tcl installed with brew, the header are in /usr/local/include/tcl.h which is in the standard search path, but the corresponding library is not in the standard search path. To resolve this, you need either to remove the additional header in /usr/local/include, or to add the search path for the library. Both the system's default and the brew one work fine here.

sctegler commented 2 years ago

Hi Ole,

Thank you for getting back to me so soon. I’m sure the problem is on my end. I’m far from an expert in linux / OSX.

I moved tcl.h to old_tcl.h in /usr/local/include/ and no luck. When I go to an xterm in XQuartz and try an xgterm & I still get

bash: /usr/local/bin/xgterm: Bad CPU type in executable

That seems like I’m trying to run a 32bit application rather than a 64bit application, but I know that’s not right as you’re able to run.

I’m not familiar with tcl.h, brew, …. How would I “add the search path for the library?”

I went to /opt/X11/bin and I see xclock, xterm, …. But no xgterm.

I’d greatly appreciate your help.

Best, Stephen

Stephen C. Tegler Professor, Astronomy and Planetary Science Director, National Undergraduate Research Observatory (NURO) he, him, his

[signature_2000136416]

olebole commented 2 years ago

This means that you still called your old xgterm from /usr/local/bin/, which is is probably a 32-bit application. You should either copy the newly created xgterm file there (recommended), or you must run it with the full path, i.e. …/x11iraf-2.1/xgterm/xgterm.

sctegler commented 2 years ago

Ole,

Thank you so much for making this software available and your help. I’ve got IRAF/xgterm/DS9 up and running on my iMac/Big Sur.

Best, Stephen

Stephen C. Tegler Professor, Astronomy and Planetary Science Director, National Undergraduate Research Observatory (NURO) he, him, his