Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ticables_get_model and ticables_get_port returning NULL #82

Open
jakebromberg opened this issue Feb 17, 2025 · 8 comments
Open

ticables_get_model and ticables_get_port returning NULL #82

jakebromberg opened this issue Feb 17, 2025 · 8 comments

Comments

@jakebromberg
Copy link

I'm running tilp inside an Ubuntu VM on a Mac. This is my output.

> tilp
TiLP2 - Version 1.19, (C) 1999-2023 The TILP Team
THIS PROGRAM COMES WITH ABSOLUTELY NO WARRANTY
PLEASE READ THE DOCUMENTATION FOR DETAILS
tilp-INFO: 02:38:51.825: setlocale: en_US.UTF-8
tilp-INFO: 02:38:51.826: bindtextdomain: /usr/share/locale/
tilp-INFO: 02:38:51.826: textdomain: tilp2
ticables-INFO: 02:38:51.829: ticables library version 1.3.6
ticables-INFO: 02:38:51.830: setlocale: en_US.UTF-8
ticables-INFO: 02:38:51.830: bindtextdomain: /usr/share/locale
ticables-INFO: 02:38:51.831: textdomain: tilp2
ticables-INFO: 02:38:51.831: kernel: 6.8.0-53-generic
tifiles-INFO: 02:38:51.979: tifiles library version 1.1.8
tifiles-INFO: 02:38:51.980: setlocale: en_US.UTF-8
tifiles-INFO: 02:38:51.980: bindtextdomain: /usr/share/locale
tifiles-INFO: 02:38:51.981: textdomain: tilp2
ticalcs-INFO: 02:38:51.983: ticalcs library version 1.1.10
ticalcs-INFO: 02:38:51.984: setlocale: en_US.UTF-8
ticalcs-INFO: 02:38:51.984: bindtextdomain: /usr/share/locale
ticalcs-INFO: 02:38:51.984: textdomain: tilp2
ticables-INFO: 02:38:51.985: Check for libusb support:
ticables-INFO: 02:38:51.985:     usb support: available.
ticables-INFO: 02:38:51.985: Check for libusb usability:
ticables-INFO: 02:38:51.986:     usb filesystem (/dev/bus/usb/): mounted
tilp-INFO: 02:38:51.986: Searching for link cables...
ticables-INFO: 02:38:51.986: Link cable probing:
ticables-INFO: 02:38:51.990:  found TI-84 Plus CE on #1, version <2.20>

tilp-INFO: 02:38:51.991: Searching for handhelds on DirectLink...
ticables-INFO: 02:38:51.992: Check for libusb support:
ticables-INFO: 02:38:51.992:     usb support: available.
ticables-INFO: 02:38:51.992: Check for libusb usability:
ticables-INFO: 02:38:51.993:     usb filesystem (/dev/bus/usb/): mounted
ticables-INFO: 02:38:51.996:  found TI-84 Plus CE on #1, version <2.20>

ticables-INFO: 02:38:51.999: found bulk in endpoint 0x81

ticables-INFO: 02:38:51.999: found bulk out endpoint 0x02

tilp-INFO: 02:38:52.000: Opening cable DirectLink on port #1 to communicate with calculator TI84+CE USB

(tilp:3481): ticables-CRITICAL **: 02:38:52.001: ticables_get_model(NULL)

(tilp:3481): ticables-CRITICAL **: 02:38:52.002: ticables_get_port(NULL)
ticables-INFO: 02:38:52.002: Check for libusb support:
ticables-INFO: 02:38:52.002:     usb support: available.
ticables-INFO: 02:38:52.002: Check for libusb usability:
ticables-INFO: 02:38:52.002:     usb filesystem (/dev/bus/usb/): mounted
ticables-INFO: 02:38:52.006:  found TI-84 Plus CE on #1, version <2.20>

ticables-INFO: 02:38:52.008: found bulk in endpoint 0x81

ticables-INFO: 02:38:52.009: found bulk out endpoint 0x02

ticalcs-INFO: 02:38:52.009: Cable DirectLink port #1 attached

(tilp:3481): Gtk-WARNING **: 02:38:52.020: cannot open display: 

This is the lsusb:

> lsusb 
...
Bus 011 Device 004: ID 0451:e008 Texas Instruments, Inc. TI-84 Plus Silver Calculator
...
@debrouxl
Copy link
Owner

debrouxl commented Feb 17, 2025

The ticables_get_model(NULL) and ticables_get_port(NULL) traces are fine, despite their CRITICAL level. They just mean that these functions were passed a null pointer for the handle.

The real error is below: (tilp:3481): Gtk-WARNING **: 02:38:52.020: cannot open display:. TILP depends on a reachable X server which speaks X11. The easiest way to do that is to use the udev rules in https://github.com/debrouxl/tilibs/blob/master/libticables/trunk/CONFIG , which are mentioned by the upstream user-oriented build script https://github.com/debrouxl/tilp_and_gfm/blob/master/tilp/trunk/build/scripts/install_tilp.sh (but are not included in some distro packages), and run TILP as non-root user.
That's probably not what you're doing here, but if you need to launch TILP through a ssh session, then you need to pass the -X (X11 forwarding) option to ssh, all the way from a X11-capable host.

@adriweb
Copy link
Contributor

adriweb commented Feb 17, 2025

(just mentioning also that tilp works fine on mac and you don't need a Linux vm for it, in case you believed so. The same install script linked by Lionel should be working, or the cmake build)

@jakebromberg
Copy link
Author

Okay, I'm trying to install tilp on macOS. I'm running into the following error when I run install_tilp.sh:

configure.ac:53: error: possibly undefined macro: AC_PROG_INTLTOOL
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.

I'm on Sequoia, by the way.

@debrouxl
Copy link
Owner

That's a typical error message on a computer missing intltool. install_tilp.sh lists it as a build dependency.

@jakebromberg
Copy link
Author

I really appreciate your help so far. At this point I'm running into the following error:

...
checking for libglade-2.0 >= 2.5.0... no
configure: error: Package requirements (libglade-2.0 >= 2.5.0) were not met:

Package 'libglade-2.0' not found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables GLADE_CFLAGS
and GLADE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
> port installed | grep libglade
  libglade2 @2.6.4_8 (active)

@adriweb
Copy link
Contributor

adriweb commented Feb 20, 2025

Is your port-installed libglade2 providing pkg-config files (.pc) that you could give their folder's path of to the PKG_CONFIG_PATH env var? If not, try populating the two manual ones directly as the error says...

But really you could just disable building gfm in the script, as you likely won't need it, and relies and libglade that has basically been deprecated and removed from most distros.

@debrouxl
Copy link
Owner

Exactly: either you need to find glade somehow, or you can just disable the line which triggers building gfm.

@debrouxl
Copy link
Owner

FTR, I've started porting GFM to GTK+Builder locally, which is the proper way to fix the issue (barring a rewrite using another UI toolkit, which is more work). I haven't yet published anything, as the port isn't functional yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants