I had tried two GCC versions: 4.3 and 4.8. And I looked for patches in Ubuntu PPA and Gentoo.A patch named 01_g_assert_nonnull.diff doesn't fix a problem.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think this is the core issue (after fixing the g_assert_nonnull() with the 01_g_asert_nonnull.diff): warning: implicit declaration of function 'g_data_input_stream_read_line_utf8'
That function was introduced in glib-2.30, which means that we are incorrectly setting minimum required version to 2.28 (which is also the version you are trying to build with).
I guess even at the time when we started using g_data_input_stream_read_line_utf8, glib 2.30+ was already prevalent enough for the issue to slip unnoticed...
If you still wish to compile with glib 2.28, you can try replacing all calls to g_data_input_stream_read_line_utf8() with g_data_input_stream_read_line(). (You still need to apply 01_g_assert_nonull.diff, though).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
A similar issue; g_thread_try_new() and g_thread_unref() were introduced in glib-2.32. They replace the obsolete g_thread_create().
To make it work with 2.28, you should:
a) remove the call to g_thread_unref() - apparently it should be redundant either way, because the call to g_thread_join() should release the reference...
b) replace the g_thread_try_new() with g_thread_create() - in audio.c (line 154), we have a similar situation, and we correctly handle both old and new API based on glib version. The device-kernel-io.c is missing a similar #if block.
I will try to install SLE11 in a VM during the weekend to do some testing and see if these workarounds work well enough that we can continue specifying 2.28 as minimum version (as opposed to bumping the requirements to 2.32).
Last edit: Rok Mandeljc 2017-03-20
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Really, don't try SLE 11. There is Glib 2.22.5 by default, 2.28 is placed in Packman repository used by 99% users. Also it's hard to get ISO, hovewer CentOS ISO is easy to get.
I make changes you told, and now cdemu-daemon is successfully builds. There is non-critical warning that doesn't break anything:
I have python-gobject2 2.20. python-gi was appear in python-gobject 2.21.4. I can make upgrade, but I want ask: can Gnome-Introspection be an optional dependency for this application? Like it was made for cdemu-daemon.
Last edit: Zenitur 2017-03-23
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am afraid gobject-introspection is mandatory, because it is used for GDBus python bindings.
For the cdemu-client, the transition from old python-dbus to GDBus was done between 3.0.1 and 3.0.3, so you could try packaging 3.0.1 instead if GDBus/gobject-introspection are not available.
(I guess gcdemu is completely out of question due to gobject-introspection and Gtk3.)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I had tried two GCC versions: 4.3 and 4.8. And I looked for patches in Ubuntu PPA and Gentoo.A patch named 01_g_assert_nonnull.diff doesn't fix a problem.
I think this is the core issue (after fixing the g_assert_nonnull() with the 01_g_asert_nonnull.diff): warning: implicit declaration of function 'g_data_input_stream_read_line_utf8'
That function was introduced in glib-2.30, which means that we are incorrectly setting minimum required version to 2.28 (which is also the version you are trying to build with).
I guess even at the time when we started using g_data_input_stream_read_line_utf8, glib 2.30+ was already prevalent enough for the issue to slip unnoticed...
If you still wish to compile with glib 2.28, you can try replacing all calls to g_data_input_stream_read_line_utf8() with g_data_input_stream_read_line(). (You still need to apply 01_g_assert_nonull.diff, though).
Thank you! I will make a workaround patch.
libmirage is successfully builds: https://build.opensuse.org/package/show/home:linux4humans:sle11_software:filesystems/libmirage
Now I have a problem with cdemu-daemon: https://build.opensuse.org/package/show/home:linux4humans:sle11_software:filesystems/cdemu-daemon Is workaround possible in this case?
A similar issue; g_thread_try_new() and g_thread_unref() were introduced in glib-2.32. They replace the obsolete g_thread_create().
To make it work with 2.28, you should:
a) remove the call to g_thread_unref() - apparently it should be redundant either way, because the call to g_thread_join() should release the reference...
b) replace the g_thread_try_new() with g_thread_create() - in audio.c (line 154), we have a similar situation, and we correctly handle both old and new API based on glib version. The device-kernel-io.c is missing a similar #if block.
I will try to install SLE11 in a VM during the weekend to do some testing and see if these workarounds work well enough that we can continue specifying 2.28 as minimum version (as opposed to bumping the requirements to 2.32).
Last edit: Rok Mandeljc 2017-03-20
Rok, thank you. You can try CentOS 6 instead of SLE 11. I see that Glib version is 2.28: http://mirror.yandex.ru/centos/6.8/os/x86_64/Packages/ CentOS is easier to install and configuring than SLE.
OK, thanks for the heads up - CentOS will be more familiar for me anyway.
Really, don't try SLE 11. There is Glib 2.22.5 by default, 2.28 is placed in Packman repository used by 99% users. Also it's hard to get ISO, hovewer CentOS ISO is easy to get.
I make changes you told, and now cdemu-daemon is successfully builds. There is non-critical warning that doesn't break anything:
This won't work, even if it compiles - the new g_thread_new and g_thread_create have different arguments!
Former line 257 should have been expanded to an #if block like this:
And the last package, cdemu-client.
I have python-gobject2 2.20. python-gi was appear in python-gobject 2.21.4. I can make upgrade, but I want ask: can Gnome-Introspection be an optional dependency for this application? Like it was made for cdemu-daemon.
Last edit: Zenitur 2017-03-23
I am afraid gobject-introspection is mandatory, because it is used for GDBus python bindings.
For the cdemu-client, the transition from old python-dbus to GDBus was done between 3.0.1 and 3.0.3, so you could try packaging 3.0.1 instead if GDBus/gobject-introspection are not available.
(I guess gcdemu is completely out of question due to gobject-introspection and Gtk3.)