Bug 1454501 - MinGW CMake macro causes CPack packaging to fail.
Summary: MinGW CMake macro causes CPack packaging to fail.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: mingw-filesystem
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kalev Lember
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-23 00:02 UTC by Alex Puchades
Modified: 2017-06-02 14:40 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1152696
Environment:
Last Closed: 2017-06-02 14:40:52 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Alex Puchades 2017-05-23 00:02:24 UTC
I'm running Fedora 25 and this bug is still present.

$ rpm -q mingw64-filesystem
mingw64-filesystem-101-1.fc25.noarch

+++ This bug was initially created as a clone of Bug #1152696 +++

Description of problem:
The mingw{32,64}-cmake command uses absolute paths to specify certain locations. If the cmake configuration honors these paths then it breaks CPack which does a fake install for packaging purposes.

Version-Release number of selected component (if applicable):
mingw32-filesystem-99-3.fc20.noarch

Actual results:
An error is generated:
Run CPack packaging tool...
/usr/bin/cpack --config ./CPackConfig.cmake
CPack: Create package using NSIS
CPack: Install projects
CPack: - Run preinstall target for: codec2
CPack: - Install project: codec2
CMake Error at /home/build/mingw32/codec2/src/cmake_install.cmake:37 (message):
  ABSOLUTE path INSTALL DESTINATION forbidden (by caller):
  /usr/i686-w64-mingw32/sys-root/mingw/lib/libcodec2.dll.a

Expected results:
Package is created correctly.

Additional info:
The main problem seems to be CMAKE_INSTALL_LIBDIR...

$ rpm -E %{mingw32_cmake}
unset $(/usr/bin/env | egrep '^(w+)=(.*)$' | egrep -vw 'PWD|USER|LANG' | /usr/bin/cut -d= -f1);
  if test -z "$PATH_ORIG" ; then
    PATH_ORIG="$PATH"; export PATH_ORIG;
  fi;
  PATH="/usr/i686-w64-mingw32/sys-root/mingw/bin:$PATH_ORIG"; export PATH;
  HOST_CC=gcc; export HOST_CC;
  unset PKG_CONFIG_PATH;
  _PREFIX="/usr/bin/i686-w64-mingw32-";
  for i in `ls -1 ${_PREFIX}* | grep -v 'gcc-'`; do
    x=`echo $i|sed "s,${_PREFIX},,"|tr "a-z+-." "A-ZX__"`;
    declare -x $x="$i" ; export $x;
  done;
  unset _PREFIX;
  CC="${MINGW32_CC:-i686-w64-mingw32-gcc}"; export CC;
  CFLAGS="${MINGW32_CFLAGS:- -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4}"; export CFLAGS;
  CPPFLAGS="${MINGW32_CPPFLAGS:-}"; export CPPFLAGS;
  if [ -x "/usr/bin/i686-w64-mingw32-g++" ]; then
    CXX="${MINGW32_CXX:-i686-w64-mingw32-g++}"; export CXX;
    CXXFLAGS="${MINGW32_CXXFLAGS:- -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4}"; export CXXFLAGS;
  else
    CXX=; export CXX;
    ac_cv_prog_CXX=no; export ac_cv_prog_CXX;
    CXXFLAGS=; export CXXFLAGS;
  fi;
  LDFLAGS="${MINGW32_LDFLAGS:-}"; export LDFLAGS;
  for i in `ls /usr/i686-w64-mingw32/sys-root/mingw/bin/*|grep -- "-config$"` ; do
    x=`basename $i|tr "a-z+-." "A-ZX_"`;
    declare -x $x="$i" ; export $x;
  done;
  unset x i ;
  PKG_CONFIG_LIBDIR="/usr/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig:/usr/i686-w64-mingw32/sys-root/mingw/share/pkgconfig"; export PKG_CONFIG_LIBDIR;
  if test -f CMakeLists.txt; then __mingw32_topdir=.; \
  elif test -f ../CMakeLists.txt; then __mingw32_topdir=..; \
  else __mingw32_topdir=""; fi; \
  PATH=/usr/i686-w64-mingw32/bin:$PATH /usr/bin/cmake \
        -DCMAKE_VERBOSE_MAKEFILE=ON \
        -DCMAKE_INSTALL_PREFIX:PATH=/usr/i686-w64-mingw32/sys-root/mingw \
        -DCMAKE_INSTALL_LIBDIR:PATH=/usr/i686-w64-mingw32/sys-root/mingw/lib \
        -DINCLUDE_INSTALL_DIR:PATH=/usr/i686-w64-mingw32/sys-root/mingw/include \
        -DLIB_INSTALL_DIR:PATH=/usr/i686-w64-mingw32/sys-root/mingw/lib \
        -DSYSCONF_INSTALL_DIR:PATH=/usr/i686-w64-mingw32/sys-root/mingw/etc \
        -DSHARE_INSTALL_PREFIX:PATH=/usr/i686-w64-mingw32/sys-root/mingw/share \
        -DCMAKE_SKIP_RPATH:BOOL=ON \
        -DBUILD_SHARED_LIBS:BOOL=ON \
        -DCMAKE_TOOLCHAIN_FILE=/usr/share/mingw/Toolchain-mingw32.cmake \
        ${MINGW_CMAKE_ARGS} \
        ${MINGW32_CMAKE_ARGS} \
        "$@" $__mingw32_topdir

--- Additional comment from Jaroslav Reznik on 2015-03-03 11:22:06 EST ---

This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

--- Additional comment from Fedora Update System on 2015-04-11 16:33:55 EDT ---

mingw-filesystem-100-1.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/mingw-filesystem-100-1.fc22

--- Additional comment from Fedora Update System on 2015-04-11 16:34:36 EDT ---

mingw-filesystem-100-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/mingw-filesystem-100-1.fc21

--- Additional comment from Fedora Update System on 2015-04-11 16:35:07 EDT ---

mingw-filesystem-100-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/mingw-filesystem-100-1.fc20

--- Additional comment from Fedora Update System on 2015-04-12 14:00:17 EDT ---

Package mingw-filesystem-100-1.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mingw-filesystem-100-1.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-6042/mingw-filesystem-100-1.fc22
then log in and leave karma (feedback).

--- Additional comment from Fedora Update System on 2015-04-21 14:28:19 EDT ---

mingw-filesystem-100-1.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

--- Additional comment from Fedora Update System on 2015-04-21 15:00:14 EDT ---

mingw-filesystem-100-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

--- Additional comment from Fedora Update System on 2015-04-21 15:13:06 EDT ---

mingw-filesystem-100-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 1 Richard Shaw 2017-06-02 14:40:52 UTC
For some reason the bodhi update wasn't set to close this bug?


Note You need to log in before you can comment on or make changes to this bug.