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

Error build stlink for Fedora Linux #666

Closed
Vascom opened this issue Feb 14, 2018 · 7 comments · Fixed by #668 or #667
Closed

Error build stlink for Fedora Linux #666

Vascom opened this issue Feb 14, 2018 · 7 comments · Fixed by #668 or #667

Comments

@Vascom
Copy link
Collaborator

Vascom commented Feb 14, 2018

I have error build stlink 1.4.0 for upcoming Fedora release.

/builddir/build/BUILD/stlink-1.4.0/src/tools/gui/stlink-gui.c: In function 'stlink_gui_set_connected':
/builddir/build/BUILD/stlink-1.4.0/src/tools/gui/stlink-gui.c:517:29: error: cast between incompatible function types from 'void (*)(STlinkGUI *)' {aka 'void (*)(struct _STlinkGUI *)'} to 'void * (*)(void *)' [-Werror=cast-function-type]
     g_thread_new ("devmem", (GThreadFunc) stlink_gui_populate_devmem_view, gui);

Full build log https://kojipkgs.fedoraproject.org//work/tasks/2219/25032219/build.log
Other components used for build https://kojipkgs.fedoraproject.org//work/tasks/2219/25032219/root.log

It can be because of GCC 8.0.1.

Please help correct this build.

@Vascom
Copy link
Collaborator Author

Vascom commented Feb 15, 2018

It could be something like this
https://developer.gnome.org/glib/stable/glib-Threads.html#GThreadFunc

diff --git a/src/tools/gui/stlink-gui.c b/src/tools/gui/stlink-gui.c
index d45db6f..0af8c2c 100644
--- a/src/tools/gui/stlink-gui.c
+++ b/src/tools/gui/stlink-gui.c
@@ -224,11 +224,14 @@ stlink_gui_update_devmem_view (STlinkGUI *gui)
 
 
 static void
-stlink_gui_populate_devmem_view (STlinkGUI *gui)
+stlink_gui_populate_devmem_view (gpointer data)
 {
     guint            off;
     stm32_addr_t     addr;
 
+    g_return_if_fail (STLINK_IS_GUI (data);
+    STlinkGUI *gui = (STlinkGUI *)data;
+
     g_return_if_fail (gui != NULL);
     g_return_if_fail (gui->sl != NULL);

slyshykO added a commit to slyshykO/stlink that referenced this issue Feb 15, 2018
@xor-gate xor-gate reopened this Feb 15, 2018
@xor-gate
Copy link
Member

@Vascom could you test latest master?

@Vascom
Copy link
Collaborator Author

Vascom commented Feb 16, 2018

Not work. Same problem https://kojipkgs.fedoraproject.org//work/tasks/5194/25085194/build.log
My code was only example from my friend-programmer.

@Vascom
Copy link
Collaborator Author

Vascom commented Feb 16, 2018

Now #668 looks good and not failed at build.
Are you plan make new release or I should use patch for 1.4.0?

@xor-gate
Copy link
Member

I will create a new release 👍

@xor-gate
Copy link
Member

v1.5.0 has been tagged, enjoy

@Vascom
Copy link
Collaborator Author

Vascom commented Feb 16, 2018

Thanks.

@Nightwalker-87 Nightwalker-87 added this to the v1.5.0 milestone Mar 18, 2020
This was linked to pull requests Mar 18, 2020
@stlink-org stlink-org locked as resolved and limited conversation to collaborators Apr 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants