Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Miscellaneous build fixes #10

Closed
wants to merge 5 commits into from
Closed

Miscellaneous build fixes #10

wants to merge 5 commits into from

Conversation

wjt
Copy link
Contributor

@wjt wjt commented Feb 27, 2021

Some fixes for issues found while trying to update the Tux Typing Flatpak to a newer toolchain.

  • configure: improve espeak/speech-dispatcher checks
  • linewrap: Fix declaration of wrapped_lines
  • Fix multiple definition of TTS variables

Marked as draft because, while I have compiled this code, I have not actually run tuxtype or tuxmath against it.

wjt added 4 commits March 1, 2021 11:53
f36ec17 introduced a compile error
wherever this header is included:

    t4k_common.h:248:1: error: multiple storage classes in declaration specifiers
      248 | extern static char wrapped_lines[MAX_LINES][MAX_LINEWIDTH]; //!< Global buffer for wrapped lines.
          | ^~~~~~

A variable can't be both extern and static. The variable must be
declared extern in a header file (which is included in, and compiled as
part of, many source files) but defined in exactly one source file in
this library.

(This variable is not used within this library; but is provided for the
convenience of library users and is used by, at least, tuxmath.)

See discussion on
tux4kids@f36ec17.
Again, these must be declared extern in a header file so that library
users can use them, but defined in a single source file.
speech-dispatcher has a pkg-config file so we can use PKG_CHECK_MODULES
to easily check for it.

Previously it was an error for speech-dispatcher to be missing, even if
espeak was present, unless the distributor supplied
--without-speech-dispatcher.

Simplify the logic and improve the configure --help output.

Fixes tux4kids#4 (I hope).
espeak-ng is an actively-maintained fork of espeak, which provides a
superset of the espeak 1.48.15 API and ABI.
@wjt wjt force-pushed the build-fixes branch 2 times, most recently from be0a2b9 to c81d3f1 Compare March 2, 2021 11:12
@wjt wjt marked this pull request as ready for review March 2, 2021 11:15
Check that the code compiles on a recent Ubuntu version with all
supported text-to-speech libraries.

The build-dependencies are taken from the 't4kcommon' Debian source
package.
@wjt
Copy link
Contributor Author

wjt commented Mar 2, 2021

I've compiled and run tuxtype against this branch. I had to do some similar fixups in tuxtype but I haven't had time to tidy those up and submit them.

I added GitHub Actions CI to check that the code compiles on Ubuntu with each of the three supported text-to-speech libraries. You can see the results at https://github.com/wjt/t4kcommon/actions.

wjt referenced this pull request Mar 2, 2021
Signed-off-by: Holger Levsen <holger@layer-acht.org>
phuff added a commit to phuff/t4kcommon that referenced this pull request May 12, 2022
…es to tuxmath :)

Some of these are similar to tux4kids#10 but there's a minor difference or two
matlacki added a commit to matlacki/t4kcommon that referenced this pull request Nov 14, 2023
@matlacki matlacki mentioned this pull request Nov 14, 2023
@h01ger
Copy link
Contributor

h01ger commented Nov 14, 2023

thanks, merged.

@h01ger h01ger closed this Nov 14, 2023
matlacki added a commit to matlacki/t4kcommon that referenced this pull request Nov 14, 2023
…tion of the library, an extra function T4K_LoadMenuArbitraryDirectory() is added unnecessarily to s rc/t4k_menu.c. This is undone in 86b6c26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants