Opened 10 years ago

Last modified 10 years ago

#43806 new defect

shogun: swig version check incorrect

Reported by: andre.david@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.3.0
Keywords: Cc: petrrr
Port: shogun

Description

In mavericks I asked for shogun +python7 and got:

:info:configure Checking for SWIG ... 3.0.0 ... too old version 2.0.4 or later required
:info:configure
:info:configure Error: swig required for modular interfaces
:info:configure
:info:configure Check configure.log if you do not understand why it failed.
:info:configure The last 20 lines of configure.log are shown below
:info:configure
:info:configure         /opt/local/lib/libhdf5.8.dylib (compatibility version 9.0.0, current version 9.1.0)
:info:configure         /opt/local/lib/libjson.0.dylib (compatibility version 1.0.0, current version 1.1.0)
:info:configure         /opt/local/lib/libxml2.2.dylib (compatibility version 12.0.0, current version 12.1.0)
:info:configure         /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib (compatibility version 1.0.0, current version 1.0.0)
:info:configure         /opt/local/lib/libarpack.2.dylib (compatibility version 3.0.0, current version 3.0.0)
:info:configure         /opt/local/lib/libglpk.33.dylib (compatibility version 34.0.0, current version 34.0.0)
:info:configure         /opt/local/lib/liblzo2.2.dylib (compatibility version 3.0.0, current version 3.0.0)
:info:configure         /opt/local/lib/libsnappy.1.dylib (compatibility version 4.0.0, current version 4.0.0)
:info:configure         /opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.8)
:info:configure         /opt/local/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.6)
:info:configure         /opt/local/lib/liblzma.5.dylib (compatibility version 6.0.0, current version 6.5.0)
:info:configure         /opt/local/lib/liblpsolve55.dylib (compatibility version 5.5.0, current version 5.5.0)
:info:configure
:info:configure Result is: yes
:info:configure ##########################################
:info:configure
:info:configure ============ Checking for SWIG ============
:info:configure Result is: 3.0.0 ... too old version 2.0.4 or later required
:info:configure ##########################################
:info:configure
:info:configure Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_shogun/shogun/work/shogun-2.1.0/src" && ./configure --prefix=/opt/local --ldflags=-lgfortran --enable-hdf5 --enable-json --enable-xml --enable-readline --enable-largefile --disable-spinlocks --enable-lapack --enable-arpack --disable-mosek --disable-superlu --disable-nlopt --enable-eigen3 --disable-cplex --enable-lpsolve --enable-glpk --enable-lzo --enable-snappy --enable-gzip --enable-bzip2 --enable-lzma --enable-bigstates --enable-hmmcache --enable-svm-light --disable-logcache --enable-shortrealkernelcache --enable-logsum-array --disable-doxygen --enable-optimization --includes=/opt/local/include --libs=/opt/local/lib --destdir=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_shogun/shogun/work/destroot --prefix=/opt/local --interfaces=cmdline_static,python_modular --enable-cpudetection --python=/opt/local/bin/python2.7 --pydir=/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages --includes=/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 --enable-hmm-parallel
:info:configure Exit code: 1
:error:configure org.macports.configure for port shogun returned: configure failure: command execution failed
:debug:configure Error code: NONE
:debug:configure Backtrace: configure failure: command execution failed
    while executing
"$procedure $targetname"
:info:configure Warning: targets not executed for shogun: org.macports.activate org.macports.configure org.macports.build org.macports.destroot org.macports.install

This is similar to what triggered #34990, but there the discussion ended up veering to a build problem, while here it is a configure problem.

I looked into shogun's configure script and the function doing the check is:

assert_version() {
        name=$1
        mode=$2
        is_ver=$3
        wanted_ver=$4
        is=(`echo $is_ver| sed 's/\./ /g'`)
        wanted=(`echo $wanted_ver | sed 's/\./ /g'`)

        if test -z "$is"; then
                die "$name did not return version information"
        fi

        i=0

        while test $i -lt ${#is[*]} 2>/dev/null && test $i -lt ${#wanted[*]} 2>/dev/null ; do
                if test ${is[i]} -lt ${wanted[i]}; then
                        if test "$mode" = yes; then
                                die "$name is outdated: version $wanted_ver required got version $is_ver."
                        fi

                        if test "$mode" = auto; then
                                echores "`echo $is_ver` ... too old version $wanted_ver or later required"
                                return 1
                        fi

                        return 1
                fi

                if test ${is[i]} -lt ${wanted[i]}; then
                        return 0
                fi
                let i++
        done

        return 0
}

So, is it just me or this function will croak if any of the version fields is smaller? I.e., in this case 3.0.0 will fail against 2.0.4 because 0 < 4...

Bump to shogun devs?

Change History (4)

comment:1 Changed 10 years ago by andre.david@…

(Or bump up shogun to 3.2.0?) Or perhaps shogun simply does not work with swig 3 yet (unclear from their site.)

Last edited 10 years ago by andre.david@… (previous) (diff)

comment:2 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: changed from macports-tickets@… to jameskyle@…
Summary: shogun unable to test for swig version?shogun: swig version check incorrect

comment:3 Changed 10 years ago by mf2k (Frank Schima)

Owner: changed from jameskyle@… to macports-tickets@…

jameskyle has retired. See #44641.

comment:4 Changed 10 years ago by petrrr

Cc: petr@… added

Cc Me!

Note: See TracTickets for help on using tickets.