[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #59173] "mkoctfile -p" returns wrong LDFLAGS o
From: |
Markus Mützel |
Subject: |
[Octave-bug-tracker] [bug #59173] "mkoctfile -p" returns wrong LDFLAGS on Windows |
Date: |
Sun, 27 Sep 2020 09:02:08 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36 Edg/85.0.564.63 |
Follow-up Comment #4, bug #59173 (project octave):
Running the command from Rik's comment #3 with the release candidate:
$ octave-cli.exe --eval '__octave_config_info__ ()' | grep scratch
ARPACK_CPPFLAGS =
-I/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/include/arpack
ARPACK_LDFLAGS =
-L/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/lib
CPPFLAGS =
-I/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/include
FFTW3F_CPPFLAGS =
-I/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/include
FFTW3F_LDFLAGS =
-L/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/lib
FFTW3_CPPFLAGS =
-I/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/include
FFTW3_LDFLAGS =
-L/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/lib
FLIBS =
-L/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/lib
-L/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/qt5/lib
-L/scratch/build/release/mxe-octave-w64/usr/lib/gcc/x86_64-w64-mingw32/9.3.0
-L/scratch/build/release/mxe-octave-w64/usr/lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/lib/../lib
-L/scratch/build/release/mxe-octave-w64/usr/lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/lib
-lm -lgfortran -lmingw32 -lmoldname -lmingwex -lmsvcrt -lquadmath -lpthread
-ladvapi32 -lshell32 -luser32 -lkernel32
FLTK_CPPFLAGS =
-I/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/include
FLTK_LDFLAGS =
-L/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/lib
-Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc
FONTCONFIG_CPPFLAGS =
-I/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/include
-I/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/include/freetype2
-I/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/include/libpng16
-I/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/include
FT2_CPPFLAGS =
-I/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/include/freetype2
-I/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/include/libpng16
-I/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/include
FT2_LIBS =
-L/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/lib -lfreetype
LDFLAGS =
-Wl,-rpath-link,/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/lib
-L/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/lib
-L/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/qt5/lib
-Wl,--export-all-symbols
MAGICK_CPPFLAGS =
-I/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/include/GraphicsMagick
-I/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/include/libxml2
-I/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/include
MAGICK_LDFLAGS =
-L/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/lib
OCT_LINK_OPTS =
-Wl,-rpath-link,/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/lib
-L/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/lib
-L/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/qt5/lib
-Wl,--export-all-symbols
PCRE_CPPFLAGS =
-I/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/include
PCRE_LDFLAGS =
-L/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/lib
QHULL_CPPFLAGS =
-I/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/include
QHULL_LDFLAGS =
-L/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/lib
QT_CPPFLAGS =
-I/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/qt5/include/QtNetwork
-I/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/qt5/include
-I/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/qt5/include/QtPrintSupport
-I/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/qt5/include
-I/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/qt5/include/QtHelp
-I/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/qt5/include
-I/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/qt5/include/QtWidgets
-I/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/qt5/include
-I/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/qt5/include/QtGui
-I/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/qt5/include
-I/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/qt5/include/QtSql
-I/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/qt5/include
-I/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/qt5/include/QtXml
-I/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/qt5/include
-I/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/qt5/include/QtCore
-I/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/qt5/include
QT_LDFLAGS =
-L/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/qt5/lib
config_opts =
'CPPFLAGS=-I/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/include'
'LDFLAGS=-L/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/lib'
'--host=x86_64-w64-mingw32' '--build=x86_64-pc-linux-gnu'
'--prefix=/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32'
'--disable-silent-rules' '--enable-install-build-logs'
'FLTK_CONFIG=/scratch/build/release/mxe-octave-w64/usr/bin/x86_64-w64-mingw32-fltk-config'
'gl_cv_func_gettimeofday_clobber=no' 'gl_cv_func_tzset_clobber=no'
'--with-blas=-lblas -lxerbla' '--enable-64' 'ax_blas_f77_func_ok=yes'
'ax_blas_integer_size=4' 'octave_cv_sizeof_fortran_integer=4'
'--with-java-includedir=/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/include/java'
'--disable-jit'
'MOC_QTVER=/scratch/build/release/mxe-octave-w64/usr/bin/x86_64-w64-mingw32-moc'
'UIC_QTVER=/scratch/build/release/mxe-octave-w64/usr/bin/x86_64-w64-mingw32-uic'
'RCC_QTVER=/scratch/build/release/mxe-octave-w64/usr/bin/x86_64-w64-mingw32-rcc'
'LRELEASE_QTVER=/scratch/build/release/mxe-octave-w64/usr/bin/x86_64-w64-mingw32-lrelease'
'octave_cv_lib_qscintilla=-lqscintilla2_qt5'
'LDFLAGS=-Wl,-rpath-link,/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/lib
-L/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/lib
-L/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/qt5/lib'
'--with-x=no' '--enable-cross-tools'
'PKG_CONFIG=/scratch/build/release/mxe-octave-w64/usr/bin/pkg-config'
'PKG_CONFIG_PATH=/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/qt5/lib/pkgconfig:/scratch/build/release/mxe-octave-w64/usr/x86_64-w64-mingw32/lib/pkgconfig'
'build_alias=x86_64-pc-linux-gnu' 'host_alias=x86_64-w64-mingw32'
Is this supposed to show how Octave was configured? Or should these contain
the flags that should be used on the target? I was assuming it was the former.
So afaict, nothing needs to change here. (Unless we want to "anonymize" the
distributed builds. But that should be a different report imho.)
I manually went through all `mkoctfile -p` variables listed by `mkoctfile
--help`.
The following ones contain `-L` flags that are valid on the build system but
not on the host system:
ALL_LDFLAGS
CPPFLAGS
LDFLAGS
OCT_LINK_OPTS
FFTW3F_LDFLAGS
FFTW3_LDFLAGS
FLIBS
All other variables look good to me with the release candidate.
The attached patch substitutes those parts of these flags that match `prefix`
on the build system with the `prefix` valid on the host system.
Maybe we should do the same for some of the other flags, too? (Probably at
least all the `*_LDFLAGS`.)
E.g.:
$ mkoctfile -p LDFLAGS
-Wl,-rpath-link,D:\SVN\Octave\test\OCTAVE~1\OCTAVE~1\mingw64\\/lib
-LD:\SVN\Octave\test\OCTAVE~1\OCTAVE~1\mingw64\\/lib
-LD:\SVN\Octave\test\OCTAVE~1\OCTAVE~1\mingw64\\/qt5/lib
-Wl,--export-all-symbols
This trick doesn't work if `prefix` doesn't match in the original flag because
the used paths aren't normalized.
E.g.:
$ mkoctfile -p FLIBS
-LD:\SVN\Octave\test\OCTAVE~1\OCTAVE~1\mingw64\\/lib
-LD:\SVN\Octave\test\OCTAVE~1\OCTAVE~1\mingw64\\/qt5/lib
-L/home/osboxes/Documents/Repositories/Octave/mxe-octave-stable/usr/lib/gcc/x86_64-w64-mingw32/9.3.0
-L/home/osboxes/Documents/Repositories/Octave/mxe-octave-stable/usr/lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/lib/../lib
-L/home/osboxes/Documents/Repositories/Octave/mxe-octave-stable/usr/lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/lib
-lm -lgfortran -lmingw32 -lmoldname -lmingwex -lmsvcrt -lquadmath -lpthread
-ladvapi32 -lshell32 -luser32 -lkernel32
Octave doesn't start for me on Windows atm (unrelated bug #59189). So I
haven't tested if this change allows to build Octave Forge packages that
previously failed.
(file #49867)
_______________________________________________________
Additional Item Attachment:
File name: bug59173_mkoctfile_prefix.patch Size:11 KB
<https://file.savannah.gnu.org/file/bug59173_mkoctfile_prefix.patch?file_id=49867>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?59173>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #59173] "mkoctfile -p" returns wrong LDFLAGS on Windows, Markus Mützel, 2020/09/23
- [Octave-bug-tracker] [bug #59173] "mkoctfile -p" returns wrong LDFLAGS on Windows, John Donoghue, 2020/09/24
- [Octave-bug-tracker] [bug #59173] "mkoctfile -p" returns wrong LDFLAGS on Windows, John W. Eaton, 2020/09/24
- [Octave-bug-tracker] [bug #59173] "mkoctfile -p" returns wrong LDFLAGS on Windows, Rik, 2020/09/24
- [Octave-bug-tracker] [bug #59173] "mkoctfile -p" returns wrong LDFLAGS on Windows,
Markus Mützel <=
- [Octave-bug-tracker] [bug #59173] "mkoctfile -p" returns wrong LDFLAGS on Windows, Rik, 2020/09/27
- [Octave-bug-tracker] [bug #59173] "mkoctfile -p" returns wrong LDFLAGS on Windows, Markus Mützel, 2020/09/28
- [Octave-bug-tracker] [bug #59173] "mkoctfile -p" returns wrong LDFLAGS on Windows, John Donoghue, 2020/09/28
- [Octave-bug-tracker] [bug #59173] "mkoctfile -p" returns wrong LDFLAGS on Windows, Rik, 2020/09/28
- [Octave-bug-tracker] [bug #59173] "mkoctfile -p" returns wrong LDFLAGS on Windows, Rik, 2020/09/28
- [Octave-bug-tracker] [bug #59173] "mkoctfile -p" returns wrong LDFLAGS on Windows, Markus Mützel, 2020/09/28
- [Octave-bug-tracker] [bug #59173] "mkoctfile -p" returns wrong LDFLAGS on Windows, Rik, 2020/09/28
- [Octave-bug-tracker] [bug #59173] "mkoctfile -p" returns wrong LDFLAGS on Windows, Markus Mützel, 2020/09/28
- [Octave-bug-tracker] [bug #59173] "mkoctfile -p" returns wrong LDFLAGS on Windows, Rik, 2020/09/28
- [Octave-bug-tracker] [bug #59173] "mkoctfile -p" returns wrong LDFLAGS on Windows, Markus Mützel, 2020/09/29