Skip to content

Commit

Permalink
For issue #124, added clang instructions, fix some errors, but could …
Browse files Browse the repository at this point in the history
…not yet duplicate the reported error.
  • Loading branch information
ahlstromcj committed Dec 6, 2023
1 parent 9c03266 commit cebd4ea
Show file tree
Hide file tree
Showing 11 changed files with 280 additions and 54 deletions.
18 changes: 16 additions & 2 deletions INSTALL
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
200 changes: 196 additions & 4 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 9 additions & 5 deletions libseq66/include/play/mutegroup.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
*/
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -153,7 +157,7 @@ class mutegroup
* saves a calculation.
*/

const int m_group_offset;
/* const */ int m_group_offset;

public:

Expand Down
15 changes: 9 additions & 6 deletions libseq66/include/play/notemapper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down Expand Up @@ -115,31 +115,34 @@ 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
* value is used as a "key" value in the map or the index in the
* array.
*/

const int m_dev_value;
/* const */ int m_dev_value;

/**
* The integer value to which the incoming (key) value is to be
* mapped. This is the value of the drum note on a GM-compliant
* 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
Expand All @@ -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
Expand Down
Loading

0 comments on commit cebd4ea

Please sign in to comment.