diff --git a/INSTALL b/INSTALL index 32ece23d..e850f7e8 100644 --- a/INSTALL +++ b/INSTALL @@ -1,6 +1,6 @@ -INSTALL for Seq66 v. 0.99.9 and above +INSTALL for Seq66 v. 0.99.12 and above Chris Ahlstrom -2015-09-10 to 2023-09-21 +2015-09-10 to 2023-12-06 Getting Seq66 requires building the code or going to "sequencer64-packages/seq66" on GitHub to get an installation package. The @@ -88,6 +88,20 @@ Bootstrap Install: automake, libtool, and other standard Linux build tools. This build results in the "qseq66" executable. +Clang Compiler: + + If one has the GNU compilers installed, one can still install Clang + and use it for the build. + + Assuming the configure script is up-to-date, and either the base clang or + a specific version (e.g. clang-16) is installed, then the next command can + be used for the base clang, or the second for a specific version: + + $ CC=clang CXX=clang++ ./configure - or - + $ CC=clang-16 CXX=clang++-16 ./configure + $ make &> make.log + $ sudo make install + Qt and Command-Line Merged Build: Per package-manager request, one can build and install both qseq66 and diff --git a/configure b/configure index 1f9561f7..918393a8 100755 --- a/configure +++ b/configure @@ -3206,7 +3206,197 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then - for ac_prog in gcc + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 @@ -3250,7 +3440,7 @@ fi fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in gcc + for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -3305,6 +3495,8 @@ esac fi fi +fi + test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} @@ -4057,7 +4249,7 @@ if test -z "$CXX"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then - for ac_prog in g++ + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 @@ -4101,7 +4293,7 @@ fi fi if test -z "$CXX"; then ac_ct_CXX=$CXX - for ac_prog in g++ + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 diff --git a/configure.ac b/configure.ac index 5dcfa090..728af475 100644 --- a/configure.ac +++ b/configure.ac @@ -37,9 +37,12 @@ AX_PREFIX_CONFIG_H([include/seq66-config.h], [seq66]) dnl gcc/g++ configuration. -AC_PROG_CC([gcc]) -AC_PROG_CXX([g++]) -AC_PROG_CXXCPP([cpp]) +dnl AC_PROG_CC([gcc]) +dnl AC_PROG_CXX([g++]) +dnl AC_PROG_CXXCPP([cpp]) +AC_PROG_CC +AC_PROG_CXX +AC_PROG_CXXCPP AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MKDIR_P diff --git a/libseq66/include/play/mutegroup.hpp b/libseq66/include/play/mutegroup.hpp index db5c45a9..12c128de 100644 --- a/libseq66/include/play/mutegroup.hpp +++ b/libseq66/include/play/mutegroup.hpp @@ -29,7 +29,7 @@ * \library seq66 application * \author Chris Ahlstrom * \date 2018-12-01 - * \updates 2022-06-28 + * \updates 2023-12-06 * \license GNU GPLv2 or above * */ @@ -99,9 +99,13 @@ class mutegroup * of row x column. It is important to note the the size of the group is * constant throughout its lifetime (and the lifetime of the * application). + * + * For issue #124, we have removed the const from some member declarations + * so that the default constructor etc. are not deleted. Thanks to clang + * for uncovering that. */ - const int m_group_size; + /* const */ int m_group_size; /** * Holds a set of boolean values in a 1-D vector, but can be virtually @@ -119,7 +123,7 @@ class mutegroup * mute-group. */ - const int m_rows; + /* const */ int m_rows; /** * Indicates the number of virtual columns in a screen-set (bank), which @@ -129,7 +133,7 @@ class mutegroup * per set or mute-group. */ - const int m_columns; + /* const */ int m_columns; /** * Experimental option to swap rows and columns. See the function @@ -153,7 +157,7 @@ class mutegroup * saves a calculation. */ - const int m_group_offset; + /* const */ int m_group_offset; public: diff --git a/libseq66/include/play/notemapper.hpp b/libseq66/include/play/notemapper.hpp index b5dbe537..76c13b7c 100644 --- a/libseq66/include/play/notemapper.hpp +++ b/libseq66/include/play/notemapper.hpp @@ -30,7 +30,7 @@ * \library libmidipp * \author Chris Ahlstrom * \date 2014-04-24 - * \updates 2023-09-01 + * \updates 2023-12-06 * \version $Revision$ * \license GNU GPL * @@ -115,9 +115,12 @@ class notemapper final : public basesettings /** * Indicates if this is a reversed pair. This boolean is needed to * determine whether the dev-note or the gm-note is the key value. + * + * For issue #124, clang deletes the assignment operator, so we + * get rid of the consts. */ - const bool m_is_reverse; + /* const */ bool m_is_reverse; /** * The incoming note number from a non-GM compliant device. This @@ -125,7 +128,7 @@ class notemapper final : public basesettings * array. */ - const int m_dev_value; + /* const */ int m_dev_value; /** * The integer value to which the incoming (key) value is to be @@ -133,13 +136,13 @@ class notemapper final : public basesettings * device. */ - const int m_gm_value; + /* const */ int m_gm_value; /** * The name of the key as represented by the non-GM device. */ - const std::string m_dev_name; + /* const */ std::string m_dev_name; /** * The name of the GM drum note or patch that is replacing the @@ -148,7 +151,7 @@ class notemapper final : public basesettings * device's sound. */ - const std::string m_gm_name; + /* const */ std::string m_gm_name; /** * The number of times this particular mapping was performed in the diff --git a/libseq66/include/play/portslist.hpp b/libseq66/include/play/portslist.hpp index 055edd6d..79651f1f 100644 --- a/libseq66/include/play/portslist.hpp +++ b/libseq66/include/play/portslist.hpp @@ -85,7 +85,7 @@ class portslist on /**< Activate the list. */ }; -protected: +public: /** * Provides a port name and the input or output values. Note that the @@ -109,6 +109,8 @@ class portslist int io_port_number; /**< The system port number. */ }; +protected: + /** * The container type for io information. Replaces std::vector. */ diff --git a/libseq66/src/cfg/mutegroupsfile.cpp b/libseq66/src/cfg/mutegroupsfile.cpp index 9540d702..07fac5cc 100644 --- a/libseq66/src/cfg/mutegroupsfile.cpp +++ b/libseq66/src/cfg/mutegroupsfile.cpp @@ -25,7 +25,7 @@ * \library seq66 application * \author Seq24 team; modifications by Chris Ahlstrom * \date 2018-11-13 - * \updates 2023-10-19 + * \updates 2023-12-06 * \license GNU GPLv2 or above * */ @@ -342,13 +342,13 @@ mutegroupsfile::write () } /** - * The default long format for writing mute groups. + * The default long format for writing mute groups. No longer needed. + * + * static const char * const sg_scanf_fmt_1 = + * "%d [ %d %d %d %d %d %d %d %d ] [ %d %d %d %d %d %d %d %d ] " + * " [ %d %d %d %d %d %d %d %d ] [ %d %d %d %d %d %d %d %d ]" ; */ -static const char * const sg_scanf_fmt_1 = - "%d [ %d %d %d %d %d %d %d %d ] [ %d %d %d %d %d %d %d %d ] " - " [ %d %d %d %d %d %d %d %d ] [ %d %d %d %d %d %d %d %d ]"; - /** * Writes the [mute-group] section to the given file stream. This can also * be called by the rcfile object to just dump the data into that file. diff --git a/libseq66/src/cfg/usrfile.cpp b/libseq66/src/cfg/usrfile.cpp index 799e6665..8ca01beb 100644 --- a/libseq66/src/cfg/usrfile.cpp +++ b/libseq66/src/cfg/usrfile.cpp @@ -26,7 +26,7 @@ * \library seq66 application * \author Chris Ahlstrom * \date 2018-11-23 - * \updates 2023-11-05 + * \updates 2023-12-06 * \license GNU GPLv2 or above * * Note that the parse function has some code that is not yet enabled. @@ -188,7 +188,7 @@ usrfile::parse () msgprintf ( msglevel::error, "Error adding %s (line = '%s')", - label, scanline() + label.c_str(), scanline() /* see issue #124 */ ); } } @@ -249,10 +249,15 @@ usrfile::parse () } else { + /* + * clang says "error: member reference base type 'const char *' + * is not a structure or union." See issue #124. + */ + msgprintf ( msglevel::error, "Error adding %s (line = '%s')", - label, scanline() + label.c_str(), scanline() ); } } diff --git a/libseq66/src/cfg/usrsettings.cpp b/libseq66/src/cfg/usrsettings.cpp index 6c55a8a4..ca9ef82a 100644 --- a/libseq66/src/cfg/usrsettings.cpp +++ b/libseq66/src/cfg/usrsettings.cpp @@ -25,7 +25,7 @@ * \library seq66 application * \author Chris Ahlstrom * \date 2015-09-23 - * \updates 2023-11-25 + * \updates 2023-12-06 * \license GNU GPLv2 or above * * Note that this module also sets the remaining legacy global variables, so @@ -237,6 +237,14 @@ static const int c_default_redraw_ms = 40; #endif /** + * Constants for the main window, etc. The c_seqchars_x and c_seqchars_y + * constants help define the "seqarea" size. These look like the number + * of characters per line and the number of lines of characters, in a + * pattern/sequence box. + * + * static const int c_seqchars_x = 15; + * static const int c_seqchars_y = 5; + * * These control sizes. We'll try changing them and see what happens. * Increasing these value spreads out the pattern grids a little bit and * makes the Patterns panel slightly bigger. Seems like it would be @@ -247,30 +255,20 @@ static const int c_default_redraw_ms = 40; * the character width (x) and height (y) in pixels. Thus, these values * would be dependent on the font chosen. But that, currently, is * hard-wired. - */ - -static const int c_text_x = 6; /* doesn't include inner padding */ -static const int c_text_y = 12; /* does include inner padding */ - -/** - * Constants for the main window, etc. The c_seqchars_x and c_seqchars_y - * constants help define the "seqarea" size. These look like the number - * of characters per line and the number of lines of characters, in a - * pattern/sequence box. - */ - -static const int c_seqchars_x = 15; -static const int c_seqchars_y = 5; - -/** + * + * static const int c_text_x = 6; // doesn't include inner padding + * static const int c_text_y = 12; // does include inner padding + * * The c_seqarea_x and c_seqarea_y constants are derived from the width * and heights of the default character set, and the number of characters * in width, and the number of lines, in a pattern/sequence box. + * + * Clang reveals they are not used. + * + * static const int c_seqarea_x = c_text_x * c_seqchars_x; + * static const int c_seqarea_y = c_text_y * c_seqchars_y; */ -static const int c_seqarea_x = c_text_x * c_seqchars_x; -static const int c_seqarea_y = c_text_y * c_seqchars_y; - /** * These control sizes. We'll try changing them and see what happens. * Increasing these value spreads out the pattern grids a little bit and diff --git a/libseq66/src/ctrl/keymap.cpp b/libseq66/src/ctrl/keymap.cpp index 996c153f..5cb2d059 100644 --- a/libseq66/src/ctrl/keymap.cpp +++ b/libseq66/src/ctrl/keymap.cpp @@ -25,7 +25,7 @@ * \library seq66 application * \author Chris Ahlstrom * \date 2018-11-12 - * \updates 2023-09-02 + * \updates 2023-12-06 * \license GNU GPLv2 or above */ @@ -127,10 +127,11 @@ arrow_down () /** * Indicates the start of section where expansion/foreign characters can be * placed. Covers the ordinals from 0xe0 to 0xfe (31 characters). + * Not yet used, as revealed by clang-12. + * + * static const int s_expansion_start = 0xe0; */ -static const int s_expansion_start = 0xe0; - /** * Provides a data type for key name/value pairs. */ diff --git a/libseq66/src/seq66_features.cpp b/libseq66/src/seq66_features.cpp index 597453bb..a58e008b 100644 --- a/libseq66/src/seq66_features.cpp +++ b/libseq66/src/seq66_features.cpp @@ -25,7 +25,7 @@ * \library seq66 application * \author Chris Ahlstrom * \date 2017-03-12 - * \updates 2023-10-28 + * \updates 2023-12-06 * \license GNU GPLv2 or above * * The first part of this file defines a couple of global structure @@ -547,9 +547,13 @@ seq_build_details () result << "Built " << __DATE__ << " " << __TIME__ "\n" << "C++ version " << std::to_string(__cplusplus) << "\n" +#if defined __clang__ + << "Clang C++ " << __clang_version__ << "\n" +#else #if defined SEQ66_PLATFORM_GNU << "GNU C++ " << __GNUC__ << "." << __GNUC_MINOR__ << "." << __GNUC_PATCHLEVEL__ << "\n" +#endif #endif << "Executable: " << seq_app_name() << " (" << seq_app_path() << ")\n" << "Interface: " << seq_app_type() << "\n"