[MacPorts] #54015: qwt52 defect in portfile
MacPorts
noreply at macports.org
Sat Apr 22 09:23:31 UTC 2017
#54015: qwt52 defect in portfile
--------------------+-------------------
Reporter: Ortner | Owner:
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.4.1
Keywords: | Port: qwt52
--------------------+-------------------
== Symptoms
Installation of qwt52 fails because it can't find lbzip2 during the
configuration phase (see attatched log). This is because lbzip2 is not
installed on my system.
Log:
{{{
:info:configure Executing: cd
"/Users/xxx/Progs/MacPorts/var/macports/build/_Users_xxx_Progs_MacPorts_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_qwt/qwt52/work/qwt-5.2.3"
&& ./configure --prefix=/Users/xxx/Progs/MacPorts
INSTALLBASE="/Users/xxx/Progs/MacPorts"
:debug:configure system: cd
"/Users/xxx/Progs/MacPorts/var/macports/build/_Users_xxx_Progs_MacPorts_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_qwt/qwt52/work/qwt-5.2.3"
&& ./configure --prefix=/Users/xxx/Progs/MacPorts
INSTALLBASE="/Users/xxx/Progs/MacPorts"
:info:configure sh: ./configure: No such file or directory
:info:configure Command failed: cd
"/Users/xxx/Progs/MacPorts/var/macports/build/_Users_xxx_Progs_MacPorts_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_qwt/qwt52/work/qwt-5.2.3"
&& ./configure --prefix=/Users/xxx/Progs/MacPorts
INSTALLBASE="/Users/xxx/Progs/MacPorts"
:info:configure Exit code: 127
:error:configure Failed to configure qwt52: configure failure: command
execution failed
:debug:configure Error code: NONE
:debug:configure Backtrace: configure failure: command execution failed
:debug:configure while executing
:debug:configure "$procedure $targetname"
:debug:configure Failed to locate 'lbzip2' in path:
'/Users/xxx/Progs/MacPorts/bin:/Users/xxx/Progs/MacPorts/sbin:/bin:/sbin:/usr/bin:/usr/sbin'
or at its MacPorts configuration time location, did you move it?
:debug:configure while executing
:debug:configure "error "$eMessage or at its MacPorts configuration time
location, did you move it?""
:debug:configure invoked from within
:debug:configure "try -pass_signal {
:debug:configure set cmd_path [macports::binaryInPath $prog]
:debug:configure return $cmd_path
:debug:configure } catch {{*} eCode eMessage} {
:debug:configure ..."
:debug:configure (procedure "macports::findBinary" line 5)
:error:configure See
/Users/xxx/Progs/MacPorts/var/macports/logs/_Users_xxx_Progs_MacPorts_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_qwt/qwt52/main.log
for details.
}}}
After installing lbzip manually it fails with the next issue:
{{{
:info:configure Executing: cd
"/Users/xxx/Progs/MacPorts/var/macports/build/_Users_xxx_Progs_MacPorts_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_qwt/qwt52/work/qwt-5.2.3"
&& ./configure --prefix=/Users/xxx/Progs/MacPorts
INSTALLBASE="/Users/xxx/Progs/MacPorts"
:debug:configure system: cd
"/Users/xxx/Progs/MacPorts/var/macports/build/_Users_xxx_Progs_MacPorts_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_qwt/qwt52/work/qwt-5.2.3"
&& ./configure --prefix=/Users/xxx/Progs/MacPorts
INSTALLBASE="/Users/xxx/Progs/MacPorts"
:info:configure sh: ./configure: No such file or directory
:info:configure Command failed: cd
"/Users/xxx/Progs/MacPorts/var/macports/build/_Users_xxx_Progs_MacPorts_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_qwt/qwt52/work/qwt-5.2.3"
&& ./configure --prefix=/Users/xxx/Progs/MacPorts
INSTALLBASE="/Users/xxx/Progs/MacPorts"
:info:configure Exit code: 127
:error:configure Failed to configure qwt52: configure failure: command
execution failed
:debug:configure Error code: NONE
:debug:configure Backtrace: configure failure: command execution failed
:debug:configure while executing
:debug:configure "$procedure $targetname"
:debug:configure invalid command name "::ui_init"
:debug:configure while executing
:debug:configure "::ui_init $priority $prefix $channels($priority)
{*}$args"
:debug:configure ("uplevel" body line 2)
:debug:configure invoked from within
:debug:configure "uplevel 1 $body"
:error:configure See
/Users/xxx/Progs/MacPorts/var/macports/logs/_Users_xxx_Progs_MacPorts_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_qwt/qwt52/main.log
for details.
}}}
Digging a bit deeper configuration fails, as port tries to call
`./configure` instead of running `qmake`.
== Proposed solution
I adapted the portfile in line 173 below to use qmake and everything seems
to work after that:
{{{
if {${qwt_major} < 6} {
# QWT version 5 can work with Qt3 or Qt4
variant qt3 conflicts qt4 description {Use qt3-mac} {}
variant qt4 conflicts qt3 description {Use qt4-mac} {}
# move setting of 'qt_qmake_cmd' outside variants, since 'if'
# statements are processed in-order while variants are processed after
# everything else.
set qt_qmake_cmd ""
if {[variant_isset qt3]} {
depends_lib-append port:qt3-mac
set qt_qmake_cmd ${prefix}/libexec/qt3-mac/bin/qmake
} else {
# when variant 'qt3' is not set, use qt4 whether by default or via
# the user's variant choice
if {![variant_isset qt4]} {
default_variants +qt4
}
PortGroup qt4 1.0
PortGroup qmake 1.0 <<---- Inserted after line 172
}
} else {
variant qt5 conflicts qt4 description "Build with Qt5" {}
variant qt4 conflicts qt5 description "Build with Qt4" {}
# QWT 6+ uses Qt4+ only
if {![variant_isset qt5]} {
PortGroup qt4 1.0
PortGroup qmake 1.0
} else {
#PortGroup qt5 1.0
PortGroup qmake5 1.0
set qt_arch_types "x86_64"
post-patch {
reinplace "s|QT_STATIC_CONST|static const|" \
${worksrcpath}/src/qwt_scale_map.cpp \
${worksrcpath}/src/qwt_scale_map.h
reinplace "s/QT_INSTALL_FRAMEWORKS/QT_INSTALL_LIBS/" \
${worksrcpath}/qwtconfig.pri
}
configure.args-append \
-config absolute_library_soname
}
}
}}}
As I'm not very familiar with port, I'm not sure if this is the right
place/way to do it.
Regards
--
Ticket URL: <https://trac.macports.org/ticket/54015>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list