LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-17-2022, 09:53 AM   #1
nobodino
Senior Member
 
Registered: Jul 2010
Location: Near Bordeaux in France
Distribution: slackware, slackware from scratch, LFS, slackware [arm], linux Mint...
Posts: 1,564

Rep: Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892
regression on -current with SDL2


SDL2 doesn't build anymore on slackware64 -current:

Code:
In file included from /usr/include/pipewire-0.3/pipewire/properties.h:35,
                 from /usr/include/pipewire-0.3/pipewire/core.h:87,
                 from /usr/include/pipewire-0.3/pipewire/context.h:67,
                 from /usr/include/pipewire-0.3/pipewire/protocol.h:46,
                 from /usr/include/pipewire-0.3/pipewire/proxy.h:108,
                 from /usr/include/pipewire-0.3/pipewire/client.h:35,
                 from /usr/include/pipewire-0.3/pipewire/pipewire.h:35,
                 from /tmp/SDL2-2.0.20/src/audio/pipewire/SDL_pipewire.h:28,
                 from /tmp/SDL2-2.0.20/src/audio/pipewire/SDL_pipewire.c:29:
/usr/include/spa-0.2/spa/utils/string.h: In function 'spa_strtof':
/usr/include/spa-0.2/spa/utils/string.h:282:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
  282 |         locale_t prev = uselocale(locale);
      |         ^~~~~~~~
/usr/include/spa-0.2/spa/utils/string.h: In function 'spa_strtod':
/usr/include/spa-0.2/spa/utils/string.h:325:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
  325 |         locale_t prev = uselocale(locale);
      |         ^~~~~~~~
cc1: some warnings being treated as errors
make: *** [Makefile:627: build/SDL_pipewire.lo] Error 1
seems to be related to new pipewire.

Follow this link: https://gitlab.freedesktop.org/pipew.../-/issues/2303

Last edited by nobodino; 04-17-2022 at 10:02 AM.
 
Old 04-17-2022, 10:14 AM   #2
nobodino
Senior Member
 
Registered: Jul 2010
Location: Near Bordeaux in France
Distribution: slackware, slackware from scratch, LFS, slackware [arm], linux Mint...
Posts: 1,564

Original Poster
Rep: Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892
The problem lies in pipewire-0.3.50, it needs the following patch:

Code:
diff -aurN pipewire-0.3.50/spa/include/spa/utils/string.h pipewire-0.3.50-mod/spa/include/spa/utils/string.h
--- pipewire-0.3.50/spa/include/spa/utils/string.h	2022-04-13 12:41:34.000000000 +0200
+++ pipewire-0.3.50-mod/spa/include/spa/utils/string.h	2022-04-17 17:04:18.214443582 +0200
@@ -276,10 +276,11 @@
 static inline float spa_strtof(const char *str, char **endptr)
 {
 	static locale_t locale = NULL;
+	locale_t prev;
 	float v;
 	if (SPA_UNLIKELY(locale == NULL))
 		locale = newlocale(LC_ALL_MASK, "C", NULL);
-	locale_t prev = uselocale(locale);
+	prev = uselocale(locale);
 	v = strtof(str, endptr);
 	uselocale(prev);
 	return v;
@@ -319,10 +320,11 @@
 static inline double spa_strtod(const char *str, char **endptr)
 {
 	static locale_t locale = NULL;
+	locale_t prev;
 	double v;
 	if (SPA_UNLIKELY(locale == NULL))
 		locale = newlocale(LC_ALL_MASK, "C", NULL);
-	locale_t prev = uselocale(locale);
+	prev = uselocale(locale);
 	v = strtod(str, endptr);
 	uselocale(prev);
 	return v;
and the pipewire.SlackBuild this modification:

Code:
cd $TMP
rm -rf $PKGNAM-$VERSION
tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1
cd $PKGNAM-$VERSION || exit 1

# patch to allow SDL2 to build
cat $CWD/pipewire-spa.patch | patch -Esp1 --verbose || exit 1

chown -R root:root .
find . \
  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
  -exec chmod 755 {} \+ -o \
  \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
  -exec chmod 644 {} \+
 
Old 04-26-2022, 10:46 PM   #3
nobodino
Senior Member
 
Registered: Jul 2010
Location: Near Bordeaux in France
Distribution: slackware, slackware from scratch, LFS, slackware [arm], linux Mint...
Posts: 1,564

Original Poster
Rep: Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892
solved in -current source tree, thanks to new SDL2 package.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] regression on -current with SDL2 nobodino Slackware 9 12-12-2021 04:36 AM
[SOLVED] just a question why there is no SDL2 package in current? adcdam Slackware 2 09-16-2021 01:05 AM
[SOLVED] Slackware Current 64 SDL2 issue UH10Y6 Slackware 2 07-28-2020 04:30 AM
SDL2 Released dugan Linux - News 1 08-13-2013 02:49 PM
Perl SDL2 install problem vargadanis Linux - Software 0 10-22-2006 01:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration