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

Compile Errors -- Linux Mint #2

Open
n8ur opened this issue Apr 26, 2024 · 6 comments
Open

Compile Errors -- Linux Mint #2

n8ur opened this issue Apr 26, 2024 · 6 comments

Comments

@n8ur
Copy link

n8ur commented Apr 26, 2024

Hi --

Trying to build HPGL-Plotter I get a lot of errors, most seeming to relate to gtk:

../../src/GTKcallbacks.c: In function ‘CB_HPGLsave’:
../../src/GTKcallbacks.c:70:9: error: unknown type name ‘GtkFileDialog’; did you mean ‘GtkNativeDialog’?
70 | GtkFileDialog *dialog = GTK_FILE_DIALOG (source_object);
| ^~~~~~~~~~~~~
| GtkNativeDialog
../../src/GTKcallbacks.c:70:33: error: implicit declaration of function ‘GTK_FILE_DIALOG’; did you mean ‘GTK_IS_DIALOG’? [-Werror=implicit-function-declaration]
70 | GtkFileDialog *dialog = GTK_FILE_DIALOG (source_object);
| ^~~~~~~~~~~~~~~

and a bunch more after that. I am guessing I need to have some gtk packages installed, but I don't know which ones are needed. This is a Linux Mint 21.3 system based on Ubuntu 22.04. I'd appreciate any pointers for getting past this.

Thanks!

@VK2BEA
Copy link
Owner

VK2BEA commented Apr 26, 2024

Did you install the prerequisites and run the configure as per the README ?
( libglib2.0-dev libgtk-4-dev )

    $ ./autogen.sh
    $ cd build/
    $ ../configure
    $ make all
    $ sudo make install

If you did,
...look at the build/config.log and make sure there are no problems highlighted. (other than trivial ones that don't have any consequences)

GtkFileDialog() should be no problem in GTK4 ... https://docs.gtk.org/gtk4/class.FileDialog.html
(it's not even marked as deprecated ... (often a common occurrence over time 8-) )

@n8ur
Copy link
Author

n8ur commented Apr 27, 2024

Thanks for getting back to me, Michael. libglib2.0-dev and libgtk-4-dev are both installed. Interestingly, apt says the "run" dependencies libglib-2 and libgtk-4 are not available. I don't think those exist as separate packages (at least under that name) on Ubuntu systems. But the libraries are both in /usr/lib.

Sadly, linux-gpib has been dropped from recent Debian releases. It's a shame the package seems to have been orphaned; I first used it more than 20 years ago. I've built the latest version from the sourceforge repo and I think I have it installed correctly.

In case it helps, here are config.log, config.status, and the complete output of "make all". The system is Linux Mint 21.3, which is based on Ubuntu 22.04 LTS.
n8ur_hpib_make_logs.zip

@VK2BEA
Copy link
Owner

VK2BEA commented Apr 27, 2024

FWIU Ubuntu 22.04 (Jammy) has libgtk-4-dev (https://launchpad.net/ubuntu/jammy/+source/gtk4).
also libglib-2.0-dev (https://packages.ubuntu.com/jammy/libglib2.0-dev)
What happens if you run .. ?
sudo apt install libgtk-4-dev

"LTS" implies to me that this may be an older version of gtk4.
GtkFileDialog() was introduced in gtk 4.10
What do you get when you run .. ?
$ gtk4-launch --version

@n8ur
Copy link
Author

n8ur commented Apr 27, 2024 via email

@VK2BEA
Copy link
Owner

VK2BEA commented Apr 27, 2024

Yes John, that's a problem. You might be able to install the latest gtk-4 from sources to /usr/local/ and compile to that.
It will be painful though 8-(
I'll look to see if I can do a 'flatpak', but this also might be a problem with the gpib library.

@Paul-Chaffey
Copy link

Hi, did you manage to generate a flatpak ?
I'm using Kubuntu 24.04, so I guess its no great issue to compile.
Thx, Paul

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