From 004094bcd29ff12184da19231bf7647ed2fc871b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= Date: Tue, 12 Nov 2024 18:11:20 +0100 Subject: [PATCH 1/8] Add API attributes to template class constructors for -O0 on Windows. * libinterp/octave-value/ov-base-int.h (octave_base_int_matrix::octave_base_int_matrix): Add dllexport attributes for constructors that are usually omitted but that need to be exported from the liboctinterp DLL when building with -O0 on Windows. --- libinterp/octave-value/ov-base-int.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libinterp/octave-value/ov-base-int.h b/libinterp/octave-value/ov-base-int.h index f7fb347a82..87f0af867a 100644 --- a/libinterp/octave-value/ov-base-int.h +++ b/libinterp/octave-value/ov-base-int.h @@ -58,9 +58,13 @@ class OCTINTERP_TEMPLATE_API octave_base_int_matrix : public octave_base_matrix< { public: - octave_base_int_matrix () : octave_base_matrix () { } + OCTINTERP_OVERRIDABLE_FUNC_API octave_base_int_matrix () + : octave_base_matrix () + { } - octave_base_int_matrix (const T& nda) : octave_base_matrix (nda) { } + OCTINTERP_OVERRIDABLE_FUNC_API octave_base_int_matrix (const T& nda) + : octave_base_matrix (nda) + { } ~octave_base_int_matrix () = default; From 397bcb29a5a107fc02a2fed56cda240700e4102b Mon Sep 17 00:00:00 2001 From: Hendrik Koerner Date: Wed, 7 Aug 2024 08:45:34 +0800 Subject: [PATCH 2/8] Improve glpk behavior (bug #66010). * libinterp/dldfcn/__glpk__.cc (glpk): Align default parameter tolpiv to current glpk version (v 5.0) default value 1e-9. Implement support of msglev setting when calling glpk subroutines. Sort the constraints for better presolving analogue to the glpk provided glpsol code. * scripts/optimization/glpk.m: Reflect updated default parameter in documentation. --- libinterp/dldfcn/__glpk__.cc | 17 +++++++++++++++-- scripts/optimization/glpk.m | 2 +- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/libinterp/dldfcn/__glpk__.cc b/libinterp/dldfcn/__glpk__.cc index d042edd46c..8655b64cf6 100644 --- a/libinterp/dldfcn/__glpk__.cc +++ b/libinterp/dldfcn/__glpk__.cc @@ -88,6 +88,7 @@ glpk (int sense, int n, int m, double *c, int nz, int *rn, int *cn, { int typx = 0; int errnum = 0; + int tout = 0; // to save and restore msglev settings time = 0.0; status = -1; // Initialize status to "bad" value @@ -173,6 +174,10 @@ glpk (int sense, int n, int m, double *c, int nz, int *rn, int *cn, glp_load_matrix (lp, nz, rn, cn, a); + // sort the constraints for better presolving analogue to the code + // sample provided by glpk + glp_sort_matrix (lp); + if (save_pb) { static char tmp[] = "outpb.lp"; @@ -180,6 +185,12 @@ glpk (int sense, int n, int m, double *c, int nz, int *rn, int *cn, error ("__glpk__: unable to write problem"); } + // direct calling glp_subroutines requires explicit msglev setting + if (par.msglev < 3) + tout = glp_term_out (GLP_OFF); + else + tout = glp_term_out (GLP_ON); + // scale the problem data if (! par.presol || lpsolver != 1) glp_scale_prob (lp, scale); @@ -188,6 +199,8 @@ glpk (int sense, int n, int m, double *c, int nz, int *rn, int *cn, if (lpsolver == 1 && ! par.presol) glp_adv_basis (lp, 0); + glp_term_out (tout); // restore previous msglev status + // For MIP problems without a presolver, a first pass with glp_simplex // is required if ((! isMIP && lpsolver == 1) @@ -586,8 +599,8 @@ Undocumented internal function. OCTAVE_GLPK_GET_REAL_PARAM ("toldj", par.toldj); // Relative tolerance used to choose eligible pivotal elements of - // the simplex table in the ratio test - par.tolpiv = 1e-10; + // the simplex table in the ratio test + par.tolpiv = 1e-9; OCTAVE_GLPK_GET_REAL_PARAM ("tolpiv", par.tolpiv); par.objll = -std::numeric_limits::max (); diff --git a/scripts/optimization/glpk.m b/scripts/optimization/glpk.m index 194e281285..e2c9acd3d6 100644 --- a/scripts/optimization/glpk.m +++ b/scripts/optimization/glpk.m @@ -318,7 +318,7 @@ ## feasible. It is not recommended that you change this parameter unless you ## have a detailed understanding of its purpose. ## -## @item tolpiv (default: 1e-10) +## @item tolpiv (default: 1e-9) ## Relative tolerance used to choose eligible pivotal elements of the simplex ## table. It is not recommended that you change this parameter unless you have ## a detailed understanding of its purpose. From b718560283a20ee3614dd9ae68d95db5d12f701e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= Date: Wed, 13 Nov 2024 09:59:53 +0100 Subject: [PATCH 3/8] Request gnulib modules "fseeko" and "ftello" (bug #66399). * bootstrap.conf: Request gnulib modules "fseeko" and "ftello" instaed of the modules "fseek" and "ftell" as suggested by Bruno Haible and Paul Eggert. --- bootstrap.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap.conf b/bootstrap.conf index 13a54ee7f1..7db7dad7bd 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -49,8 +49,8 @@ gnulib_modules=" fpucw frexp frexpf - fseek - ftell + fseeko + ftello ftruncate getcwd gethostname From 104906bd48157a288c78ac5cb7e5ff3b234b789c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= Date: Wed, 13 Nov 2024 10:18:28 +0100 Subject: [PATCH 4/8] Use gnulib replacement for fseeko in when printing to .ps files (bug #66399). * libinterp/corefcn/gl2ps-print.cc (gl2ps_renderer::draw): Use wrapper around gnulib's "fseeko" function instead of using "std::fseek". That might improve support when writing .ps files larger than 2 GiB. (Suggested by Paul Eggert and Bruno Haible.) --- libinterp/corefcn/gl2ps-print.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libinterp/corefcn/gl2ps-print.cc b/libinterp/corefcn/gl2ps-print.cc index d12665507b..111c3c0476 100644 --- a/libinterp/corefcn/gl2ps-print.cc +++ b/libinterp/corefcn/gl2ps-print.cc @@ -40,6 +40,7 @@ #include #include "file-ops.h" +#include "filepos-wrappers.h" #include "lo-mappers.h" #include "oct-locbuf.h" #include "oct-env.h" @@ -419,7 +420,7 @@ gl2ps_renderer::draw (const graphics_object& go, const std::string& print_cmd) m_buffer_overflow = false; buffsize *= 2; - std::fseek (tmpf, 0, SEEK_SET); + octave_fseeko_wrapper (tmpf, 0, SEEK_SET); octave_ftruncate_wrapper (fileno (tmpf), 0); // For LaTeX output the print process uses 2 drawnow() commands. @@ -493,7 +494,7 @@ gl2ps_renderer::draw (const graphics_object& go, const std::string& print_cmd) } // Copy temporary file to pipe - std::fseek (tmpf, 0, SEEK_SET); + octave_fseeko_wrapper (tmpf, 0, SEEK_SET); char str[8192]; // 8 kB is a common kernel buffersize std::size_t nread, nwrite; nread = 1; From 86f823b5f342005b4ddd8838b7ab922b4944879a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= Date: Thu, 14 Nov 2024 17:50:52 +0100 Subject: [PATCH 5/8] Update to gnulib revision 72abb08f4495bf232736f4d13a24bced72a9c327 (bug #66399). * bootstrap.conf: Update GNULIB_REVISION to a commit that contains fixes for issues with large files on Windows. --- bootstrap | 7 ++- bootstrap-funclib.sh | 139 ++++++++++++++++++++++++++++--------------- bootstrap.conf | 2 +- 3 files changed, 96 insertions(+), 52 deletions(-) diff --git a/bootstrap b/bootstrap index 4beae0e912..6acad165a3 100755 --- a/bootstrap +++ b/bootstrap @@ -1,7 +1,7 @@ #! /bin/sh # Bootstrap this package from checked-out sources. -scriptversion=2024-04-13.15; # UTC +scriptversion=2024-07-04.10; # UTC # Copyright (C) 2003-2024 Free Software Foundation, Inc. # @@ -117,7 +117,8 @@ Gnulib sources can be fetched in various ways: * Otherwise, if the 'gnulib' directory does not exist, Gnulib sources are cloned into that directory using git from \$GNULIB_URL, defaulting - to $default_gnulib_url. + to $default_gnulib_url; if GNULIB_REFDIR is set and is a git repository + its contents may be used to accelerate the process. If the configuration variable GNULIB_REVISION is set in bootstrap.conf, then that revision is checked out. @@ -237,7 +238,7 @@ fi # ---------------------------------------------------------------------------- # Local Variables: -# eval: (add-hook 'before-save-hook 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp nil t) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" diff --git a/bootstrap-funclib.sh b/bootstrap-funclib.sh index f7905eb208..7c125533e0 100644 --- a/bootstrap-funclib.sh +++ b/bootstrap-funclib.sh @@ -1,6 +1,6 @@ # A library of shell functions for autopull.sh, autogen.sh, and bootstrap. -scriptlibversion=2024-04-28.09; # UTC +scriptlibversion=2024-11-12.21; # UTC # Copyright (C) 2003-2024 Free Software Foundation, Inc. # @@ -468,11 +468,10 @@ prepare_GNULIB_SRCDIR () # if the GNULIB_REVISION is a commit hash that only exists in # origin. In this case, we need a 'git fetch' and then retry # 'git checkout "$GNULIB_REVISION"'. - (cd "$GNULIB_SRCDIR" \ - && { git checkout "$GNULIB_REVISION" 2>/dev/null \ - || { git fetch origin && git checkout "$GNULIB_REVISION"; } - } - ) || exit $? + git -C "$GNULIB_SRCDIR" checkout "$GNULIB_REVISION" 2>/dev/null \ + || { git -C "$GNULIB_SRCDIR" fetch origin \ + && git -C "$GNULIB_SRCDIR" checkout "$GNULIB_REVISION"; } \ + || exit $? fi else if ! $use_git; then @@ -491,7 +490,7 @@ prepare_GNULIB_SRCDIR () if test -n "$GNULIB_REFDIR" && test -d "$GNULIB_REFDIR"/.git; then # Use GNULIB_REFDIR as a reference. echo "$0: getting gnulib files..." - git submodule update --init --reference "$GNULIB_REFDIR" "$gnulib_path" \ + git submodule update --init --reference "$GNULIB_REFDIR" "$gnulib_path"\ || exit $? else # GNULIB_REFDIR is not set or not usable. Ignore it. @@ -509,33 +508,65 @@ prepare_GNULIB_SRCDIR () # The subdirectory 'gnulib' does not yet exist. Clone into it. echo "$0: getting gnulib files..." trap cleanup_gnulib HUP INT PIPE TERM - shallow= - if test -z "$GNULIB_REVISION"; then - if git clone -h 2>&1 | grep -- --depth > /dev/null; then - shallow='--depth 2' - fi - git clone $shallow ${GNULIB_URL:-$default_gnulib_url} "$gnulib_path" \ - || cleanup_gnulib + gnulib_url=${GNULIB_URL:-$default_gnulib_url} + if test -n "$GNULIB_REFDIR" && test -d "$GNULIB_REFDIR"/.git; then + # Use GNULIB_REFDIR as a reference. + git clone "$GNULIB_REFDIR" "$gnulib_path" \ + && git -C "$gnulib_path" remote set-url origin "$gnulib_url" \ + && if test -z "$GNULIB_REVISION"; then + git -C "$gnulib_path" pull origin \ + && { + # We want the default branch of "$gnulib_url" (since that's + # the behaviour if GNULIB_REFDIR is not specified), not the + # current branch of "$GNULIB_REFDIR". + default_branch=`LC_ALL=C git -C "$gnulib_path" \ + remote show origin \ + | sed -n -e 's/^ *HEAD branch: //p'` + test -n "$default_branch" || default_branch='master' + git -C "$gnulib_path" checkout "$default_branch" + } + else + # The 'git checkout "$GNULIB_REVISION"' command succeeds if the + # GNULIB_REVISION is a commit hash that exists locally, or if it + # is a branch name that can be fetched from origin. It fails, + # however, if the GNULIB_REVISION is a commit hash that only + # exists in origin. In this case, we need a 'git fetch' and then + # retry 'git checkout "$GNULIB_REVISION"'. + git -C "$gnulib_path" checkout "$GNULIB_REVISION" 2>/dev/null \ + || { git -C "$gnulib_path" fetch origin \ + && git -C "$gnulib_path" checkout "$GNULIB_REVISION"; } + fi \ + || cleanup_gnulib else - if git fetch -h 2>&1 | grep -- --depth > /dev/null; then - shallow='--depth 2' + # GNULIB_REFDIR is not set or not usable. Ignore it. + shallow= + if test -z "$GNULIB_REVISION"; then + if git clone -h 2>&1 | grep -- --depth > /dev/null; then + shallow='--depth 2' + fi + git clone $shallow "$gnulib_url" "$gnulib_path" \ + || cleanup_gnulib + else + if git fetch -h 2>&1 | grep -- --depth > /dev/null; then + shallow='--depth 2' + fi + mkdir -p "$gnulib_path" + # Only want a shallow checkout of $GNULIB_REVISION, but git does not + # support cloning by commit hash. So attempt a shallow fetch by + # commit hash to minimize the amount of data downloaded and changes + # needed to be processed, which can drastically reduce download and + # processing time for checkout. If the fetch by commit fails, a + # shallow fetch can not be performed because we do not know what the + # depth of the commit is without fetching all commits. So fall back + # to fetching all commits. + git -C "$gnulib_path" init + git -C "$gnulib_path" remote add origin "$gnulib_url" + git -C "$gnulib_path" fetch $shallow origin "$GNULIB_REVISION" \ + || git -C "$gnulib_path" fetch origin \ + || cleanup_gnulib + git -C "$gnulib_path" reset --hard FETCH_HEAD + git -C "$gnulib_path" checkout "$GNULIB_REVISION" || cleanup_gnulib fi - mkdir -p "$gnulib_path" - # Only want a shallow checkout of $GNULIB_REVISION, but git does not - # support cloning by commit hash. So attempt a shallow fetch by commit - # hash to minimize the amount of data downloaded and changes needed to - # be processed, which can drastically reduce download and processing - # time for checkout. If the fetch by commit fails, a shallow fetch can - # not be performed because we do not know what the depth of the commit - # is without fetching all commits. So fall back to fetching all - # commits. - git -C "$gnulib_path" init - git -C "$gnulib_path" remote add origin ${GNULIB_URL:-$default_gnulib_url} - git -C "$gnulib_path" fetch $shallow origin "$GNULIB_REVISION" \ - || git -C "$gnulib_path" fetch origin \ - || cleanup_gnulib - git -C "$gnulib_path" reset --hard FETCH_HEAD - (cd "$gnulib_path" && git checkout "$GNULIB_REVISION") || cleanup_gnulib fi trap - HUP INT PIPE TERM else @@ -543,16 +574,15 @@ prepare_GNULIB_SRCDIR () if test -n "$GNULIB_REVISION"; then if test -d "$gnulib_path/.git"; then # The 'git checkout "$GNULIB_REVISION"' command succeeds if the - # GNULIB_REVISION is a commit hash that exists locally, or if it is - # branch name that can be fetched from origin. It fails, however, - # if the GNULIB_REVISION is a commit hash that only exists in - # origin. In this case, we need a 'git fetch' and then retry - # 'git checkout "$GNULIB_REVISION"'. - (cd "$gnulib_path" \ - && { git checkout "$GNULIB_REVISION" 2>/dev/null \ - || { git fetch origin && git checkout "$GNULIB_REVISION"; } - } - ) || exit $? + # GNULIB_REVISION is a commit hash that exists locally, or if it + # is a branch name that can be fetched from origin. It fails, + # however, if the GNULIB_REVISION is a commit hash that only + # exists in origin. In this case, we need a 'git fetch' and then + # retry 'git checkout "$GNULIB_REVISION"'. + git -C "$gnulib_path" checkout "$GNULIB_REVISION" 2>/dev/null \ + || { git -C "$gnulib_path" fetch origin \ + && git -C "$gnulib_path" checkout "$GNULIB_REVISION"; } \ + || exit $? else die "Error: GNULIB_REVISION is specified in bootstrap.conf," \ "but '$gnulib_path' contains no git history" @@ -682,7 +712,8 @@ Gnulib sources can be fetched in various ways: * Otherwise, if the 'gnulib' directory does not exist, Gnulib sources are cloned into that directory using git from \$GNULIB_URL, defaulting - to $default_gnulib_url. + to $default_gnulib_url; if GNULIB_REFDIR is set and is a git repository + its contents may be used to accelerate the process. If the configuration variable GNULIB_REVISION is set in bootstrap.conf, then that revision is checked out. @@ -850,9 +881,7 @@ update_po_files() { && ls "$ref_po_dir"/*.po 2>/dev/null | sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS" || return - langs=$(cd $ref_po_dir && echo *.po | sed 's/\.po//g') - test "$langs" = '*' && langs=x - for po in $langs; do + for po in x $(ls $ref_po_dir | sed -n 's/\.po$//p'); do case $po in x) continue;; esac new_po="$ref_po_dir/$po.po" cksum_file="$ref_po_dir/$po.s1" @@ -1216,6 +1245,20 @@ autogen() $gnulib_tool $gnulib_tool_options --import $gnulib_modules \ || die "gnulib-tool failed" + if test $with_gettext = yes && test ! -f $m4_base/gettext.m4; then + # The gnulib-tool invocation has removed $m4_base/gettext.m4, that the + # AUTOPOINT invocation had installed. This can occur when the gnulib + # module 'gettext' was previously present but is now not present any more. + # Repeat the AUTOPOINT invocation and the gnulib-tool invocation. + + echo "$0: $AUTOPOINT --force" + $AUTOPOINT --force || return + + echo "$0: $gnulib_tool $gnulib_tool_options --import ..." + $gnulib_tool $gnulib_tool_options --import $gnulib_modules \ + || die "gnulib-tool failed" + fi + for file in $gnulib_files; do symlink_to_dir "$GNULIB_SRCDIR" $file \ || die "failed to symlink $file" @@ -1301,7 +1344,7 @@ autogen() || die 'cannot generate runtime-po/Makevars' # Copy identical files from po to runtime-po. - (cd po && cp -p Makefile.in.in *-quot *.header *.sed *.sin ../runtime-po) + cp -p po/Makefile.in.in po/*-quot po/*.header po/*.sed po/*.sin runtime-po fi fi @@ -1313,7 +1356,7 @@ autogen() # ---------------------------------------------------------------------------- # Local Variables: -# eval: (add-hook 'before-save-hook 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp nil t) # time-stamp-start: "scriptlibversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" diff --git a/bootstrap.conf b/bootstrap.conf index 7db7dad7bd..19e3d83aa6 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -204,7 +204,7 @@ source_base="libgnu" # # See also: https://lists.gnu.org/archive/html/bug-gnulib/2020-08/msg00150.html -: ${GNULIB_REVISION=6213c5bd72d15ca5e1ea9c34122899e02fed448c} +: ${GNULIB_REVISION=72abb08f4495bf232736f4d13a24bced72a9c327} # Don't check for translations since we don't have any in Octave yet. # This avoids the need for sha1sum or compatible utility in bootstrap. From 6d11527107203ecdfb898ccaa552be6d24562e5b Mon Sep 17 00:00:00 2001 From: Torsten Lilge Date: Sun, 17 Nov 2024 11:22:49 +0100 Subject: [PATCH 6/8] polish user interface of the find files dialog in GUI editor * find-files-dialog.cc (ctor): make group headings bold, files list also in a group with heading and short explanation * find-files-model.cc (data): if role is tool tip role, return tool tips explaining that a double click opens file or sets directory depending on current column --- libgui/src/find-files-dialog.cc | 18 +++++++++++++++--- libgui/src/find-files-model.cc | 17 +++++++++++++++++ 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/libgui/src/find-files-dialog.cc b/libgui/src/find-files-dialog.cc index 39516221e3..455759bb30 100644 --- a/libgui/src/find-files-dialog.cc +++ b/libgui/src/find-files-dialog.cc @@ -120,7 +120,6 @@ find_files_dialog::find_files_dialog (QWidget *p) m_file_list->setSelectionBehavior (QAbstractItemView::SelectRows); m_file_list->setSelectionMode (QAbstractItemView::SingleSelection); m_file_list->setAlternatingRowColors (true); - m_file_list->setToolTip (tr ("Search results")); m_file_list->setSortingEnabled (true); m_file_list->horizontalHeader ()->restoreState (settings.value (ff_column_state.settings_key ()).toByteArray ()); m_file_list->horizontalHeader ()->setSortIndicatorShown (true); @@ -160,7 +159,9 @@ find_files_dialog::find_files_dialog (QWidget *p) this, &find_files_dialog::close); // name options + const QString gbox_style_sheet ("QGroupBox { font-weight: bold; } "); QGroupBox *name_group = new QGroupBox (tr ("Filename/Location")); + name_group->setStyleSheet(gbox_style_sheet); QGridLayout *name_layout = new QGridLayout; name_group->setLayout (name_layout); @@ -178,6 +179,7 @@ find_files_dialog::find_files_dialog (QWidget *p) // content options QGroupBox *content_group = new QGroupBox (tr ("File contents")); + content_group->setStyleSheet(gbox_style_sheet); QGridLayout *content_layout = new QGridLayout; content_group->setLayout (content_layout); content_layout->addWidget (m_contains_text_check, 4, 1); @@ -185,12 +187,22 @@ find_files_dialog::find_files_dialog (QWidget *p) content_layout->setColumnStretch (2, 1); content_layout->addWidget (m_content_case_check, 5, 1); + // results + QLabel *results_hint = new QLabel (tr ("Results: Double click opens the file" + " or sets the directory")); + QGroupBox *results_group = new QGroupBox (tr ("Search results")); + results_group->setStyleSheet(gbox_style_sheet); + QVBoxLayout *results_layout = new QVBoxLayout (); + results_group->setLayout (results_layout); + results_layout->addWidget (results_hint); + results_layout->addWidget (m_file_list); + + // main layout QGridLayout *main_layout = new QGridLayout; - main_layout->setSizeConstraint (QLayout::SetFixedSize); main_layout->addWidget (name_group, 0, 0); main_layout->addWidget (content_group, 1, 0); main_layout->addWidget (button_box, 0, 1, 3, 1); - main_layout->addWidget (m_file_list, 2, 0); + main_layout->addWidget (results_group, 2, 0); main_layout->setRowStretch (2, 1); main_layout->addWidget (m_status_bar, 3, 0, 1, -1); diff --git a/libgui/src/find-files-model.cc b/libgui/src/find-files-model.cc index 7770071127..2a19bcdb60 100644 --- a/libgui/src/find-files-model.cc +++ b/libgui/src/find-files-model.cc @@ -176,6 +176,23 @@ find_files_model::data (const QModelIndex& idx, int role) const break; } } + else if (role == Qt::ToolTipRole) + { + switch (idx.column ()) + { + case 0: + retval = tr ("Double click to open the file"); + break; + + case 1: + retval = tr ("Double click to set the directory"); + break; + + default: + break; + } + } + } return retval; From 62bc2e7bead08c74bbda218b4972817c009ce68c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= Date: Sun, 17 Nov 2024 19:13:31 +0100 Subject: [PATCH 7/8] GitHub-CI: Show content of config.log after running the configure script. * .gitbub/workflows/make-alpine.yaml (configure), .gitbub/workflows/make-cygwin.yaml (configure), .gitbub/workflows/make-macos.yaml (configure), .gitbub/workflows/make-mingw.yaml (configure), .gitbub/workflows/make-ubuntu.yaml (configure): Show the content of "config.log" after the configure script has run. --- .github/workflows/make-alpine.yaml | 5 +++++ .github/workflows/make-cygwin.yaml | 5 +++++ .github/workflows/make-macos.yaml | 5 +++++ .github/workflows/make-mingw.yaml | 5 +++++ .github/workflows/make-ubuntu.yaml | 5 +++++ 5 files changed, 25 insertions(+) diff --git a/.github/workflows/make-alpine.yaml b/.github/workflows/make-alpine.yaml index 7994b0a735..1e4245619c 100644 --- a/.github/workflows/make-alpine.yaml +++ b/.github/workflows/make-alpine.yaml @@ -172,7 +172,12 @@ jobs: echo gfortran --version gfortran --version mkdir .build + echo "::group::Run configure script" cd .build && ../configure + echo "::endgroup::" + echo "::group::Show config.log" + cat ./config.log + echo "::endgroup::" - name: build # Parallel make seems to fail intermittently when creating the figures diff --git a/.github/workflows/make-cygwin.yaml b/.github/workflows/make-cygwin.yaml index 542a00d31f..5597684416 100644 --- a/.github/workflows/make-cygwin.yaml +++ b/.github/workflows/make-cygwin.yaml @@ -172,6 +172,7 @@ jobs: echo $F77 --version $F77 --version mkdir .build + echo "::group::Run configure script" cd .build && ../configure \ --libexecdir=/usr/lib \ --enable-shared \ @@ -181,6 +182,10 @@ jobs: JAVA_HOME="" \ EGREP="grep -E" \ FLIBS="-lgfortran -lquadmath" + echo "::endgroup::" + echo "::group::Show config.log" + cat ./config.log + echo "::endgroup::" - name: build # Spawning processes seems to have a big overhead on this platform. Use a somewhat larger number of parallel processes to compensate for that. diff --git a/.github/workflows/make-macos.yaml b/.github/workflows/make-macos.yaml index 2ad5d7431c..05e0de2932 100644 --- a/.github/workflows/make-macos.yaml +++ b/.github/workflows/make-macos.yaml @@ -146,6 +146,7 @@ jobs: echo gfortran --version gfortran --version mkdir .build + echo "::group::Run configure script" cd .build && ../configure \ CXX="${CXX} ${{ matrix.cxx-compiler-flags }}" \ F77="ccache gfortran" \ @@ -159,6 +160,10 @@ jobs: --with-blas="-L${HOMEBREW_PREFIX}/opt/openblas/lib -lopenblas" \ --with-java-homedir="${HOMEBREW_PREFIX}/opt/openjdk" \ --prefix="${HOME}/usr" + echo "::endgroup::" + echo "::group::Show config.log" + cat ./config.log + echo "::endgroup::" - name: build run: make -C ./.build all -j3 V=1 diff --git a/.github/workflows/make-mingw.yaml b/.github/workflows/make-mingw.yaml index 74478968fb..b8cdb66784 100644 --- a/.github/workflows/make-mingw.yaml +++ b/.github/workflows/make-mingw.yaml @@ -177,11 +177,16 @@ jobs: echo $F77 --version $F77 --version mkdir .build + echo "::group::Run configure script" cd .build && ../configure \ JAVA_HOME="" \ --enable-relocate-all \ --disable-docs \ ${{ matrix.extra-config-flags }} + echo "::endgroup::" + echo "::group::Show config.log" + cat ./config.log + echo "::endgroup::" - name: build # Spawning processes seems to have a big overhead on this platform. Use a somewhat larger number of parallel processes to compensate for that. diff --git a/.github/workflows/make-ubuntu.yaml b/.github/workflows/make-ubuntu.yaml index ec4b0ea61d..1daf652c3b 100644 --- a/.github/workflows/make-ubuntu.yaml +++ b/.github/workflows/make-ubuntu.yaml @@ -115,10 +115,15 @@ jobs: echo gfortran --version gfortran --version mkdir .build + echo "::group::Run configure script" cd .build && ../configure \ CPPFLAGS="-I/usr/include/hdf5/serial -I/usr/include/suitesparse" \ LDFLAGS="-L/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/hdf5/serial" \ ${{ matrix.extra-config-flags }} + echo "::endgroup::" + echo "::group::Show config.log" + cat ./config.log + echo "::endgroup::" - name: build # Parallel make seems to fail intermittently when creating the figures From 737ae68bc6b9c7982b33839ec0d9be29dc2cdbf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= Date: Sun, 17 Nov 2024 19:19:25 +0100 Subject: [PATCH 8/8] GitHub-CI (macos): Install and use the libiconv package from Homebrew (bug #66448). * .github/workflows/make-macos.yaml (install dependencies): Install the libiconv package from Homebrew. That is necessary because the Apple implementation of libiconv is buggy in macOS 14 and no longer accepted by newer versions of gnulib. (configure): Use headers and libraries from the libiconv package from Homebrew. --- .github/workflows/make-macos.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/make-macos.yaml b/.github/workflows/make-macos.yaml index 05e0de2932..3952d96fb6 100644 --- a/.github/workflows/make-macos.yaml +++ b/.github/workflows/make-macos.yaml @@ -76,7 +76,7 @@ jobs: brew install --overwrite python@3.12 python@3.13 brew reinstall gcc brew install arpack epstool fftw fig2dev fltk fontconfig freetype \ - ghostscript gl2ps glpk gnuplot graphicsmagick hdf5 libsndfile \ + ghostscript gl2ps glpk gnuplot graphicsmagick hdf5 libiconv libsndfile \ libtool openblas pcre2 portaudio pstoedit qhull qrupdate \ qscintilla2 qt@${{ matrix.qt }} rapidjson readline suite-sparse sundials texinfo \ ccache gnu-sed openjdk pkg-config \ @@ -89,6 +89,7 @@ jobs: echo "${HOMEBREW_PREFIX}/opt/texinfo/bin" >> $GITHUB_PATH echo "${HOMEBREW_PREFIX}/opt/bison/bin" >> $GITHUB_PATH echo "${HOMEBREW_PREFIX}/opt/gnu-sed/libexec/gnubin" >> $GITHUB_PATH + echo "${HOMEBREW_PREFIX}/opt/libiconv/bin" >> $GITHUB_PATH - name: prepare ccache # create key with human readable timestamp @@ -150,9 +151,9 @@ jobs: cd .build && ../configure \ CXX="${CXX} ${{ matrix.cxx-compiler-flags }}" \ F77="ccache gfortran" \ - CPPFLAGS="-I${HOMEBREW_PREFIX}/opt/gettext/include -I${HOMEBREW_PREFIX}/opt/icu4c/include -I${HOMEBREW_PREFIX}/opt/qt@${{ matrix.qt }}/include -I${HOMEBREW_PREFIX}/opt/readline/include -I${HOMEBREW_PREFIX}/opt/sqlite/include $MY_CPPFLAGS -I${HOMEBREW_PREFIX}/include" \ + CPPFLAGS="-I${HOMEBREW_PREFIX}/opt/gettext/include -I${HOMEBREW_PREFIX}/opt/icu4c/include -I${HOMEBREW_PREFIX}/opt/libiconv/include -I${HOMEBREW_PREFIX}/opt/qt@${{ matrix.qt }}/include -I${HOMEBREW_PREFIX}/opt/readline/include -I${HOMEBREW_PREFIX}/opt/sqlite/include $MY_CPPFLAGS -I${HOMEBREW_PREFIX}/include" \ CXXFLAGS="-O2 -g" \ - LDFLAGS="-L${HOMEBREW_PREFIX}/opt/bison/lib -L${HOMEBREW_PREFIX}/opt/gettext/lib -L${HOMEBREW_PREFIX}/opt/icu4c/lib -L${HOMEBREW_PREFIX}/opt/readline/lib -L${HOMEBREW_PREFIX}/opt/sqlite/lib $MY_LDFLAGS -L${HOMEBREW_PREFIX}/lib" \ + LDFLAGS="-L${HOMEBREW_PREFIX}/opt/bison/lib -L${HOMEBREW_PREFIX}/opt/gettext/lib -L${HOMEBREW_PREFIX}/opt/icu4c/lib -L${HOMEBREW_PREFIX}/opt/libiconv/lib -L${HOMEBREW_PREFIX}/opt/readline/lib -L${HOMEBREW_PREFIX}/opt/sqlite/lib $MY_LDFLAGS -L${HOMEBREW_PREFIX}/lib" \ PKG_CONFIG_PATH="${HOMEBREW_PREFIX}/opt/openblas/lib/pkgconfig:${HOMEBREW_PREFIX}/opt/icu4c/lib/pkgconfig:${HOMEBREW_PREFIX}/${{ matrix.qt-pkg-config-path }}" \ --with-qt=${{ matrix.qt }} \ QCOLLECTIONGENERATOR="qhelpgenerator" \