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

qml library files are installed in the wrong directory #162

Closed
martinkg opened this issue Jul 11, 2016 · 13 comments

Comments

Projects
None yet
2 participants
@martinkg
Copy link

commented Jul 11, 2016

Hi,

with the recent version vlc-qt-1.1.0 the qml libraries will be installed on Fedora 24 to the following folder:
/usr/qml/VLCQt/libVLCQt.so
/usr/qml/VLCQt/libVLCQt.so.1.1
/usr/qml/VLCQt/libVLCQt.so.1.1.0
/usr/qml/VLCQt/qmldir

but this shoult be:
/usr/lib64/qml/VLCQt/libVLCQt.so
/usr/lib64/qml/VLCQt/libVLCQt.so.1.1
/usr/lib64/qml/VLCQt/libVLCQt.so.1.1.0
/usr/lib64/qml/VLCQt/qmldir

the attached patch corrects this.
vlc-qt-1.1.0-CMakeLists.patch.txt

@ntadej

This comment has been minimized.

Copy link
Member

commented Jul 11, 2016

Thank you for this patch. It seems that qml path is system dependend. Will check on all platforms.

@ntadej ntadej added the Bug label Jul 11, 2016

ntadej added a commit that referenced this issue Aug 11, 2016

@ntadej

This comment has been minimized.

Copy link
Member

commented Aug 11, 2016

@martinkg Also, you can try this in feature/gnuinstalldirs branch. Add cmake flag -DSYSTEM_QML=ON

@martinkg

This comment has been minimized.

Copy link
Author

commented Aug 14, 2016

Hi ntadej,

the %cmake macro on Fedora set the following variables:

rpm -E "%cmake"

CFLAGS="${CFLAGS:--O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic}" ; export CFLAGS ;
CXXFLAGS="${CXXFLAGS:--O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic}" ; export CXXFLAGS ;
FFLAGS="${FFLAGS:--O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -I/usr/lib64/gfortran/modules}" ; export FFLAGS ;
FCFLAGS="${FCFLAGS:--O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -I/usr/lib64/gfortran/modules}" ; export FCFLAGS ;
LDFLAGS="${LDFLAGS:--Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld}" ; export LDFLAGS ;
/usr/bin/cmake
-DCMAKE_C_FLAGS_RELEASE:STRING="-DNDEBUG"
-DCMAKE_CXX_FLAGS_RELEASE:STRING="-DNDEBUG"
-DCMAKE_Fortran_FLAGS_RELEASE:STRING="-DNDEBUG"
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
-DCMAKE_INSTALL_PREFIX:PATH=/usr
-DINCLUDE_INSTALL_DIR:PATH=/usr/include
-DLIB_INSTALL_DIR:PATH=/usr/lib64
-DSYSCONF_INSTALL_DIR:PATH=/etc
-DSHARE_INSTALL_PREFIX:PATH=/usr/share
%if "lib64" == "lib64"
-DLIB_SUFFIX=64
%endif
-DBUILD_SHARED_LIBS:BOOL=ON

you uses CMAKE_INSTALL_PREFIX and not CMAKE_INSTALL_LIBDIR, i patched this in Dependencies.cmake

diff -Naur config/Dependencies.cmake.orig config/Dependencies.cmake
--- config/Dependencies.cmake.orig 2016-08-14 21:29:13.990185529 +0200
+++ config/Dependencies.cmake 2016-08-14 21:30:47.500343673 +0200
@@ -80,6 +80,6 @@
OUTPUT_VARIABLE QT_INSTALL_QML OUTPUT_STRIP_TRAILING_WHITESPACE
)
ELSE()

  •    SET(QT_INSTALL_QML ${CMAKE_INSTALL_PREFIX}/qml)
    
  •    SET(QT_INSTALL_QML ${CMAKE_INSTALL_LIBDIR}/qml)
    
    ENDIF()
    ENDIF()

maybe you can change this in your code ? otherwise i must set -DCMAKE_INSTALL_PREFIX:PATH=%{_libdir} and this is really not correct.

@ntadej

This comment has been minimized.

Copy link
Member

commented Aug 14, 2016

If you use -DSYSTEM_QML=ON cmake should ask qmake where to install QML files so no need to patch. I will make gnuinstalldirs optional as they seem not to work on rpm based distros.

I will let you know, when I have a new version to test.

ntadej added a commit that referenced this issue Aug 14, 2016

@martinkg

This comment has been minimized.

Copy link
Author

commented Aug 20, 2016

test with las git version 5cdcadb

cmake -DCMAKE_C_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_Fortran_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr -DINCLUDE_INSTALL_DIR:PATH=/usr/include -DLIB_INSTALL_DIR:PATH=/usr/lib64 -DSYSCONF_INSTALL_DIR:PATH=/etc -DSHARE_INSTALL_PREFIX:PATH=/usr/share -DLIB_SUFFIX=64 -DBUILD_SHARED_LIBS:BOOL=ON . -DBUILD_TESTS:BOOL=ON -DSYSTEM_QML:BOOL=OFF

only compiles fine with this patch:

--- config/Dependencies.cmake.orig 2016-08-14 21:29:13.990185529 +0200
+++ config/Dependencies.cmake 2016-08-14 21:30:47.500343673 +0200
@@ -80,6 +80,6 @@
OUTPUT_VARIABLE QT_INSTALL_QML OUTPUT_STRIP_TRAILING_WHITESPACE
)
ELSE()

  •    SET(QT_INSTALL_QML ${CMAKE_INSTALL_PREFIX}/qml)
    
  •    SET(QT_INSTALL_QML ${CMAKE_INSTALL_LIBDIR}/qml)
    
    ENDIF()
    ENDIF()

otherwise, the libraries libVLCQt.so* are installed to /usr/lib and not to /usr/lib64

not correct:
-- Installing: /home/martin/rpmbuild/BUILDROOT/vlc-qt-1.1.0-0.1git5cdcadb.fc24.x86_64/usr/qml/VLCQt/libVLCQt.so.1.1.0
-- Installing: /home/martin/rpmbuild/BUILDROOT/vlc-qt-1.1.0-0.1git5cdcadb.fc24.x86_64/usr/qml/VLCQt/libVLCQt.so.1.1
-- Installing: /home/martin/rpmbuild/BUILDROOT/vlc-qt-1.1.0-0.1git5cdcadb.fc24.x86_64/usr/qml/VLCQt/libVLCQt.so

@ntadej

This comment has been minimized.

Copy link
Member

commented Aug 20, 2016

You need to set SYSTEM_QML ON not OFF!

@martinkg

This comment has been minimized.

Copy link
Author

commented Aug 22, 2016

I used this command to build:

cmake -DCMAKE_C_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_Fortran_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr -DINCLUDE_INSTALL_DIR:PATH=/usr/include -DLIB_INSTALL_DIR:PATH=/usr/lib64 -DSYSCONF_INSTALL_DIR:PATH=/etc -DSHARE_INSTALL_PREFIX:PATH=/usr/share -DLIB_SUFFIX=64 -DBUILD_SHARED_LIBS:BOOL=ON . -DBUILD_TESTS:BOOL=ON -DSYSTEM_QML:BOOL=ON

this is the result:
-- Installing: /home/martin/rpmbuild/BUILDROOT/vlc-qt-1.1.0-0.1git5cdcadb.fc24.x86_64/VLCQt/libVLCQt.so.1.1.0
-- Installing: /home/martin/rpmbuild/BUILDROOT/vlc-qt-1.1.0-0.1git5cdcadb.fc24.x86_64/VLCQt/libVLCQt.so.1.1
-- Installing: /home/martin/rpmbuild/BUILDROOT/vlc-qt-1.1.0-0.1git5cdcadb.fc24.x86_64/VLCQt/libVLCQt.so
-- Set runtime path of "/home/martin/rpmbuild/BUILDROOT/vlc-qt-1.1.0-0.1git5cdcadb.fc24.x86_64/VLCQt/libVLCQt.so.1.1.0" to ""
-- Installing: /home/martin/rpmbuild/BUILDROOT/vlc-qt-1.1.0-0.1git5cdcadb.fc24.x86_64/VLCQt/qmldir
CMake Error at src/plugins/VLCQt/cmake_install.cmake:92 (EXECUTE_PROCESS):
execute_process called with no value for WORKING_DIRECTORY.
Call Stack (most recent call first):
src/cmake_install.cmake:40 (include)
cmake_install.cmake:122 (include)

Makefile:74: recipe for target 'install' failed
make: *** [install] Error 1

If i use this patch all is fine:
`--- config/Dependencies.cmake.orig 2016-08-14 21:29:13.990185529 +0200
+++ config/Dependencies.cmake 2016-08-14 21:30:47.500343673 +0200
@@ -80,6 +80,6 @@
OUTPUT_VARIABLE QT_INSTALL_QML OUTPUT_STRIP_TRAILING_WHITESPACE
)
ELSE()

  •    SET(QT_INSTALL_QML ${CMAKE_INSTALL_PREFIX}/qml)
    
  •    SET(QT_INSTALL_QML ${CMAKE_INSTALL_LIBDIR}/qml)
    
    ENDIF()
    ENDIF()`
@martinkg

This comment has been minimized.

Copy link
Author

commented Aug 22, 2016

sorry don't no how to post a patch here
i replaced in config/Dependencies.cmake the line
SET(QT_INSTALL_QML ${CMAKE_INSTALL_PREFIX}/qml)
by
SET(QT_INSTALL_QML ${CMAKE_INSTALL_LIBDIR}/qml)

and all is fine.

@ntadej

This comment has been minimized.

Copy link
Member

commented Aug 22, 2016

I will setup a virtual machine to test this so I will not bother you anymore, but I'm busy at the moment, so give me a week.

ntadej added a commit that referenced this issue Sep 12, 2016

@martinkg

This comment has been minimized.

Copy link
Author

commented Sep 12, 2016

Sorry did not work with your mentioned changes in rpm spec file with last git ff15c34:

  • cp -pr LICENSE.md /home/martin/rpmbuild/BUILDROOT/vlc-qt-1.1.0-0.2gitff15c34.fc24.x86_64/usr/share/licenses/vlc-qt
  • exit 0

RPM build errors:
File not found: /home/martin/rpmbuild/BUILDROOT/vlc-qt-1.1.0-0.2gitff15c34.fc24.x86_64/usr/lib64/qt5/qml/VLCQt/libVLCQt.so
File not found: /home/martin/rpmbuild/BUILDROOT/vlc-qt-1.1.0-0.2gitff15c34.fc24.x86_64/usr/lib64/qt5/qml/VLCQt/libVLCQt.so.1.1
File not found: /home/martin/rpmbuild/BUILDROOT/vlc-qt-1.1.0-0.2gitff15c34.fc24.x86_64/usr/lib64/qt5/qml/VLCQt/libVLCQt.so.1.1.0
File not found: /home/martin/rpmbuild/BUILDROOT/vlc-qt-1.1.0-0.2gitff15c34.fc24.x86_64/usr/lib64/qt5/qml/VLCQt/qmldir
Directory not found: /home/martin/rpmbuild/BUILDROOT/vlc-qt-1.1.0-0.2gitff15c34.fc24.x86_64/usr/lib64/qt5/qml/VLCQt

[martin@fc24 SPECS]$ find /home/martin/rpmbuild/BUILDROOT/vlc-qt-1.1.0-0.2gitff15c34.fc24.x86_64/ -name libVLCQt.so.1.1 -print

/home/martin/rpmbuild/BUILDROOT/vlc-qt-1.1.0-0.2gitff15c34.fc24.x86_64/usr/qml/VLCQt/libVLCQt.so.1.1

could you please give me access to your rpm spec file ?
Thanks.

@ntadej

This comment has been minimized.

@martinkg

This comment has been minimized.

Copy link
Author

commented Sep 12, 2016

works now, thanks.

@ntadej

This comment has been minimized.

Copy link
Member

commented Sep 12, 2016

OK, I will release this in 1.1.1 soon as I test it on Ubuntu and Windows.

@ntadej ntadej modified the milestone: 1.1.1 Sep 17, 2016

@ntadej ntadej closed this in 3d380d2 Sep 17, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.