You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see that PR #1004 has tried to address an issue of where stlink-gui.ui ends up getting installed. For me (on Ubuntu 18.04) this still appears to get it wrong.
If I build with
make release
sudo make install
stlink-gui.ui ends up in /usr/local/share/stlink/ which is where I'd expect
If I build with
make CMAKEFLAGS=-DCMAKE_INSTALL_PREFIX=/usr release
sudo make install
stlink-gui.ui ends up in /usr/share/stlink/ (again as expected)
In either case the stlink-gui program seems to try and open share/stlink/stlink-gui.ui (note no leading /)
strace -e access stlink-gui 2>&1 | tail -n3
access("share/stlink/stlink-gui.ui", F_OK) = -1 ENOENT (No such file or directory)
Failed to load UI file: stlink-gui.ui
+++ exited with 1 +++
I don't know much about CMake but I assume this has something to do with the way the definition of STLINK_UI_DIR= is defined and how CMAKE_INSTALL_DATAROOTDIR works (or perhaps it needs to be "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}").
The text was updated successfully, but these errors were encountered:
I change stlink/src/stlink-gui/CMakelist.txt line 37,38 into the following and it worked. set_target_property requires absolute path and CMAKE_INSTALL_DATAROOTDIR has stripped CMAKE_INSTALL_PREFIX part away.
@cpackham & @lentychang: Thx for reporting. Looks good to me. 👍
I can reproduce both, the error and the successful fix - it will be pushed upstream soon.
I see that PR #1004 has tried to address an issue of where
stlink-gui.ui
ends up getting installed. For me (on Ubuntu 18.04) this still appears to get it wrong.If I build with
stlink-gui.ui
ends up in/usr/local/share/stlink/
which is where I'd expectIf I build with
stlink-gui.ui
ends up in/usr/share/stlink/
(again as expected)In either case the
stlink-gui
program seems to try and openshare/stlink/stlink-gui.ui
(note no leading/
)I don't know much about CMake but I assume this has something to do with the way the definition of
STLINK_UI_DIR=
is defined and howCMAKE_INSTALL_DATAROOTDIR
works (or perhaps it needs to be"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}"
).The text was updated successfully, but these errors were encountered: