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
Closed

qml library files are installed in the wrong directory #162

martinkg opened this issue Jul 11, 2016 · 13 comments
Labels
Milestone

Comments

@martinkg
Copy link

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
Copy link
Member

ntadej commented Jul 11, 2016

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

@ntadej
Copy link
Member

ntadej commented Aug 11, 2016

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

@martinkg
Copy link
Author

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
Copy link
Member

ntadej 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.

@martinkg
Copy link
Author

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
Copy link
Member

ntadej commented Aug 20, 2016

You need to set SYSTEM_QML ON not OFF!

@martinkg
Copy link
Author

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
Copy link
Author

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
Copy link
Member

ntadej 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.

@martinkg
Copy link
Author

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
Copy link
Member

ntadej commented Sep 12, 2016

@martinkg
Copy link
Author

works now, thanks.

@ntadej
Copy link
Member

ntadej 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 as completed in 3d380d2 Sep 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants