#tde-devs < 2025/12/30 > |
| [07:50] | micheleC has joined |
| [08:18] | denk: probably we need both PRs |
| [08:18] | denk: an external sed and modified regexp |
| [08:19] | denk: "...nothing works and no one knows why" :) |
| [08:19] | SlavekB: It's strange to me because I build tqt for R14.1.5 on FreeBSD without having to deal with sed. |
| [08:20] | micheleC: initial proposal was a simple grep + awk |
| [08:20] | micheleC: and to me it was easier to read.... |
| [08:20] | SlavekB: So the right way is definitely to find out if there is any other expression that needs to be fixed so that it doesn't depend on GNU extensions. |
| [08:20] | micheleC: I agree we don't need an external sed |
| [08:21] | denk: last two years I used tde built from the ports, now I want to develop some tools and I want to be "up to date", I built basic packages from the repo as is |
| [08:21] | denk: just run configure from freebsd console |
| [08:23] | micheleC: can you test this command @denis: |
| [08:23] | micheleC: grep "\bQMAKE_CXX\b" $QMAKESPEC/qmake.conf | awk '{print $3;}' |
| [08:23] | micheleC: just for quick reference |
| [08:23] | denk: btw, also I use readonly autofs to mount the repo from a server, tqt3 builds in a "shadow" mode |
| [08:24] | denk: asus% grep "\bQMAKE_CXX\b" freebsd-clang/qmake.conf | awk '{print $3;}' |
| [08:24] | denk: clang++ |
| [08:24] | denk: asus% grep "\bQMAKE_CXX\b" linux-g++/qmake.conf | awk '{print $3;}' |
| [08:24] | denk: g++ |
| [08:24] | denk: works both |
| [08:26] | micheleC: @Fat-zer doesn't like grep+awk, but IMO it is way simpler to read, it works and there is already grep+awk in the same configure file |
| [08:26] | micheleC: @SlavekB, what is your opinion on that? |
| [08:26] | denk: unix way: do lesser but better |
| [08:27] | micheleC: :-) |
| [08:27] | SlavekB: I admit that awk is also a tool I don't use and I'm used to sed. |
| [08:27] | SlavekB: That's why awk scripts are much harder to read for me than regular expressions in sed. |
| [08:28] | micheleC: I mostly don't use awk either, but for simple printing of fields it is very convenient |
| [08:29] | denk: regexp looks like chinese to me |
| [08:31] | SlavekB: That's not Chinese, that's magic incantations, that's why not everyone can read it :) |
| [08:31] | micheleC: (y) |
| [08:32] | micheleC: @denk: this one work for you on g++ |
| [08:32] | micheleC: asus% sed -n 's,^[[:space:]]*QMAKE_CXX[[:space:]]*=[[:space:]]*\([^[:space:]]+\)[[:space:]]*,\1,p' /home/denis/projects/trinity/main/dependencies/tqt3/mkspecs/linux-g++/qmake.conf |
| [08:32] | micheleC: but doesn't work on freebsd qmake |
| [08:32] | micheleC: can you check the two spec files and see the difference? the reges maybe just need a small tweak |
| [08:32] | micheleC: even better if you test this one |
| [08:32] | micheleC: sed -n '/^[[:space:]]*QMAKE_CXX[[:space:]]*=[[:space:]]*/{s///;s/[[:space:]]*$//;p;q}' "$QMAKESPEC/qmake.conf |
| [08:33] | denk: asus% sed -n 's,^[[:space:]]*QMAKE_CXX[[:space:]]*=[[:space:]]*\([^[:space:]]+\)[[:space:]]*,\1,p' freebsd-g++/qmake.conf |
| [08:33] | denk: g++ |
| [08:33] | denk: works for freebsd-g++ |
| [08:33] | micheleC: oh, it didn't show in your comment on TGW |
| [08:33] | denk: clang++ does not work |
| [08:33] | micheleC: ah ok, clang++ doesn't work |
| [08:33] | micheleC: but it means the two qmake.conf file have some difference |
| [08:34] | micheleC: it works here on freebsd-clang++ |
| [08:34] | denk: mix some strings to one file to test that all |
| [08:36] | micheleC: it's weird, it works on g++, why not on clang? assuming you don't have any change on those qmake.conf files |
| [08:36] | denk: https://paste.dilos.org/?08ca33be083c7add#WUNRlG0rg8xf4RoXYM6qv2Rb8OSOAVJpCZ1yudDml0o= |
| [08:36] | tde-bot: Page title: PrivateBin |
| [08:37] | denk: perhaps you should see 3 lines |
| [08:37] | denk: all they must match the regexp |
| [08:39] | micheleC: yes, here I see all 3 lanes, after copy and paste |
| [08:39] | denk: freebsd sed matches only one |
| [08:40] | micheleC: are you sure there are no strange invisible characters? can you check with hexdump? because g++ or clang++ all fit the regex, so it is very weird it behaves differently |
| [08:40] | denk: gsed matches only g++ |
| [08:41] | denk: asus% sed -n 's,^[[:space:]]*QMAKE_CXX[[:space:]]*=[[:space:]]*\([^[:space:]]+\)[[:space:]]*,\1,p' test.txt|hexdump |
| [08:41] | denk: 0000000 2b67 0a2b |
| [08:41] | denk: 0000004 |
| [08:41] | micheleC: maybe hexdump the test file and upload on private bin |
| [08:42] | denk: https://paste.dilos.org/?83677c45fc5e74e1#BtGgIwrQkEE7lXe2jpVrf2/G0+JA1JItd5GUf64ygpU= |
| [08:42] | tde-bot: Page title: PrivateBin |
| [08:42] | micheleC: ok, leet me see |
| [08:43] | denk: btw, 202020 could be 090909 (aka \t) |
| [08:48] | micheleC: can't see any problem in the hex dump |
| [08:49] | denk: a problem is in the matcher |
| [08:49] | denk: something wrong |
| [08:50] | denk: as we speak here "one character" |
| [08:50] | micheleC: but why wrong on clang++ and not wrong on c++? that is weird |
| [08:50] | denk: that is the question |
| [08:51] | denk: one symbol... but where is it? |
| [08:51] | micheleC: \([^[:space:]]+\) this is the matching part |
| [08:52] | micheleC: anything that is not a spacing character, one or more repeatedlt |
| [08:52] | micheleC: if you use \([^ ]+\) does it work? |
| [08:52] | micheleC: although it would fail on tabs |
| [08:54] | micheleC: well no, tabs get caugh by the surrounding part of the regex |
| [08:54] | denk: asus% sed -n 's,^[[:space:]]*QMAKE_CXX[[:space:]]*=[[:space:]]*\([[:alnum:]]*\)[[:space:]]*,\1,p' test.txt |
| [08:54] | denk: clang++ |
| [08:54] | denk: g++ |
| [08:54] | denk: sunCC |
| [08:54] | denk: I'm trying to understand re_format(7) |
| [08:55] | micheleC: that is even more weird, because [[:alnum:]] does not include the + sign |
| [08:56] | micheleC: it's like it capture 'g' or 'calng' and prints that, then ++ is the unmatched part |
| [08:57] | micheleC: ah I am able to replicate the issue |
| [08:58] | micheleC: can you try this? |
| [08:58] | micheleC: sed -n 's,^[[:space:]]*QMAKE_CXX[[:space:]]*=[[:space:]]*\([^[:space:]]\+\)\s*,\1,p' |
| [08:58] | denk: have you got a plan, Mr. Fix? :) |
| [08:58] | micheleC: note the extra \ before the + |
| [08:58] | denk: asus% sed -n 's,^[[:space:]]*QMAKE_CXX[[:space:]]*=[[:space:]]*\([^[:space:]]\+\)\s*,\1,p' test.txt |
| [08:58] | denk: sed: 1: "s,^[[:space:]]*QMAKE_CX ...": RE error: trailing backslash (\) |
| [08:59] | micheleC: sed -n 's,^[[:space:]]*QMAKE_CXX[[:space:]]*=[[:space:]]*\([^[:space:]]\+\)\s*,\1,p' test.confclang++g++sunCC |
| [08:59] | denk: the same error |
| [09:00] | micheleC: uhm.... |
| [09:00] | denk: huh, it works on my home sparc dilos |
| [09:00] | denk: t5240% sed -n 's,^[[:space:]]*QMAKE_CXX[[:space:]]*=[[:space:]]*\([^[:space:]]\+\)\s*,\1,p' test.txt |
| [09:00] | denk: clang++ |
| [09:00] | denk: g++ |
| [09:00] | micheleC: and works here too |
| [09:01] | denk: sunCC |
| [09:01] | denk: but it does not work on freebsd |
| [09:01] | micheleC: here is linux |
| [09:01] | denk: I know you are all penguins :) |
| [09:02] | micheleC: :-D |
| [09:02] | micheleC: a penguin that lives in a house with many windows.... |
| [09:03] | denk: I am an alien system form :) |
| [09:07] | denk: \s is a perl extenstion |
| [09:08] | denk: asus% sed -n 's,^[[:space:]]*QMAKE_CXX[[:space:]]*=[[:space:]]*\([^[:space:]]\+*\)[[:space:]]*,\1,p' test.txt |
| [09:08] | denk: clang++ |
| [09:08] | denk: g++ |
| [09:08] | denk: micheleC: test it |
| [09:08] | denk: sunCC |
| [09:09] | denk: does not work on sparc :( |
| [09:14] | micheleC: sed -n 's,^[[:space:]]*QMAKE_CXX[[:space:]]*=[[:space:]]*\([^[:space:]]\+*\)[[:space:]]*,\1,p' test.txtsed: -e expression #1, char 85: Invalid preceding regular expression |
| [09:14] | micheleC: I think the problem is that your system and linux/sparc treat the + differently, one need the escaping with \ and one doesn't |
| [09:15] | denk: asus% cut -f 2 -d '=' test.txt |
| [09:15] | denk: clang++ |
| [09:15] | denk: g++ |
| [09:15] | denk: sunCC |
| [09:15] | denk: works on both my platforms |
| [09:16] | denk: sed+cut |
| [09:26] | denk: awk '/^[[:space:]]*QMAKE_CXX[[:space:]]*=.*/{print $3}' test.txt |
| [09:27] | denk: micheleC: test it |
| [09:28] | denk: or this: awk -F '=' '/^[[:space:]]*QMAKE_CXX[[:space:]]*=.*/{print $2}' test.txt |
| [09:28] | denk: with a delimiter |
| [09:30] | micheleC: works but it does not cut off the whitespaces |
| [09:31] | micheleC: if we want to use awk, then again grep "\bQMAKE_CXX\b" $QMAKESPEC/qmake.conf | awk '{print $3;}' just works..... |
| [09:31] | micheleC: and cuts off whitespaces |
| [09:31] | denk: grep+awk vs just awk |
| [09:34] | micheleC: can you test this one? sed -n -E 's,^[[:space:]]*QMAKE_CXX[[:space:]]*=[[:space:]]*([^[:space:]]+)[[:space:]]*,\1,p' |
| [09:34] | micheleC: is uses extended regex |
| [09:34] | micheleC: if your sed supports -E |
| [09:35] | denk: awk -F '=' '/^[[:space:]]*QMAKE_CXX[[:space:]]*=.*/{gsub(/ /, "", $0); print $2}' test.txt |
| [09:36] | denk: asus% sed -n -E 's,^[[:space:]]*QMAKE_CXX[[:space:]]*=[[:space:]]*([^[:space:]]+)[[:space:]]*,\1,p' test.txt |
| [09:36] | denk: clang++ |
| [09:36] | denk: works! |
| [09:36] | denk: g++ |
| [09:36] | denk: sunCC |
| [09:36] | denk: and on sparc too |
| [09:36] | micheleC: and in the home of the penguins too |
| [09:36] | micheleC: looks like we can settle on this one them |
| [09:36] | micheleC: *then |
| [09:37] | denk: commit it and I will try to build it |
| [09:38] | micheleC: can you test this? |
| [09:38] | micheleC: sed -n -E 's,^[[:space:]]*QMAKE_CXX[[:space:]]*=[[:space:]]*([^[:space:]]+)[[:space:]]*,\1,p;q' |
| [09:38] | micheleC: it should print only the first one found and exit |
| [09:39] | micheleC: the 'q' at the end stops sed after the first match |
| [09:39] | denk: exactly, works |
| [09:39] | micheleC: (y) |
| [09:40] | denk: do you think somebody adds many definitions of QMAKE_CXX in the file? |
| [09:41] | micheleC: no, but just in case we pick the first and stop |
| [09:41] | denk: that only last does matter |
| [09:54] | denk: micheleC: ping! |
| [09:55] | denk: asus% sed -n -E 's,^[[:space:]]*QMAKE_CXX[[:space:]]*=[[:space:]]*([^[:space:]]+)[[:space:]]*,\1,p;q' /home/denis/projects/trinity/main/dependencies/tqt3/mkspecs/freebsd-clang/qmake.conf |
| [09:55] | denk: asus% |
| [09:55] | denk: asus% sed -n -E 's,^[[:space:]]*QMAKE_CXX[[:space:]]*=[[:space:]]*([^[:space:]]+)[[:space:]]*,\1,p' /home/denis/projects/trinity/main/dependencies/tqt3/mkspecs/freebsd-clang/qmake.conf |
| [09:55] | denk: clang++ |
| [09:55] | denk: asus% |
| [09:56] | denk: it does not work on freebsd with ';q' |
| [09:59] | micheleC: I will be back after dinner |
| [09:59] | micheleC: ok, no q |
| [10:00] | denk: the same here, I'll be back in a hour |
| [10:55] | denk: now Fat-Zer tryes to fix that :) |
| [11:23] | Fat-Zer has joined |
| [12:02] | micheleC: @Fat-Zer: see latest comment on TGW |
| [12:03] | micheleC: why not using extended regex? |
| [12:04] | micheleC: @denk: can yuo try this? |
| [12:04] | micheleC: sed -n '/^[[:space:]]*QMAKE_CXX[[:space:]]*=[[:space:]]*/{s,,,;s,[[:space:]]*$,,;p}' /home/denis/projects/trinity/main/dependencies/tqt3/mkspecs/freebsd-clang/qmake.conf |
| [12:05] | micheleC: it's the same one proposed by Alex but without the q at the end |
| [12:06] | denk: asus% sed -n '/^[[:space:]]*QMAKE_CXX[[:space:]]*=[[:space:]]*/{s,,,;s,[[:space:]]*$,,;p}' /home/denis/projects/trinity/main/dependencies/tqt3/mkspecs/freebsd-clang/qmake.conf |
| [12:06] | denk: sed: 1: "/^[[:space:]]*QMAKE_CXX ...": extra characters at the end of p command |
| [12:06] | denk: I've tested it all |
| [12:06] | denk: let me create a symlink to the file... |
| [12:06] | Fat-Zer: micheleC: just missed a semicolon... |
| [12:07] | Fat-Zer: micheleC: and already answered on gitea |
| [12:07] | Fat-Zer: also bsd sed doesn't support ERE |
| [12:08] | micheleC: denk did test the ere version before and it worked. is it a different bsd? |
| [12:08] | micheleC: @denk: can you test the latest suggestion from Alex from TGW? |
| [12:09] | denk: asus% sed -n '/^[[:space:]]*QMAKE_CXX[[:space:]]*=[[:space:]]*/ { s///; s/[[:space:]]*$//; p; q; }' qmake.conf |
| [12:09] | denk: clang++ |
| [12:09] | denk: probably it works |
| [12:10] | Fat-Zer: micheleC: wdym by extended regexp? the `-r` key? AFAIR bsd doesn't have it... |
| [12:11] | denk: t5240% sed -n '/^[[:space:]]*QMAKE_CXX[[:space:]]*=[[:space:]]*/ { s///; s/[[:space:]]*$//; p; q; }' projects/trinity/main/dependencies/tqt3/mkspecs/dilos-g++/qmake.conf |
| [12:11] | denk: g++ |
| [12:11] | denk: also it works on sparc |
| [12:13] | micheleC: the extended regex is the version whe we used "sed -n -E". The "-E" enable extended RE, which is different from posix BRE |
| [12:13] | denk: sorry, guys, I have not built tdepim, I still live without mail at all |
| [12:13] | micheleC: ok, so it seems we finally have a working version we are all happy with |
| [12:14] | denk: -E Interpret regular expressions as extended (modern) regular |
| [12:14] | denk: expressions rather than basic regular expressions (BRE's). The |
| [12:14] | denk: re_format(7) manual page fully describes both formats. |
| [12:14] | denk: from freebsd man sed |
| [12:15] | denk: https://man.freebsd.org/cgi/man.cgi?query=re_format |
| [12:15] | tde-bot: Page title: re_format |
| [12:18] | Fat-Zer: oh... I was wrong... freeBSD actually does have it... though POSIX doesn't specify it https://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html |
| [12:21] | Fat-Zer: ok, I'm merging it? |
| [12:22] | micheleC: *y( |
| [12:22] | micheleC: (y) |
| [12:22] | micheleC: actually version with ERE is easier to read, but don't want to spend any more time on this PR. LEt's go ahead and merge |
| [12:23] | denk: instead of ${SED} :) |
| [12:24] | micheleC: (y) |
| [12:25] | denk: how many packages are in the future... |
| [12:25] | denk: and happy new bugs :) |
| [13:10] | SlavekB has quit (Quit: Kopete 0.12.7 : http://trinitydesktop.org) |
| [13:13] | denk: guys, I have another question |
| [13:14] | denk: https://paste.dilos.org/?776862314a5850f9#SS6qVksvbLYK+3NFf5533eTOy6KSL/wPjLLogohaM2o= |
| [13:14] | tde-bot: Page title: PrivateBin |
| [13:14] | denk: what is NBBY? |
| [13:15] | denk: dependencies/arts on master branch |
| [13:15] | denk: home-srv% md5sum flow/audioiosndio.cpp |
| [13:15] | denk: 73e515a99d3790926dc518011eb6beea flow/audioiosndio.cpp |
| [13:20] | micheleC: number of bit per byte |
| [13:20] | micheleC: defined in sys/param.h |
| [13:21] | micheleC: or in Xpoll.h |
| [13:29] | denk: thanks |
| [13:29] | denk: found it |
| [13:29] | micheleC: (y) |
| [13:29] | denk: it will be another PR |
| [13:34] | denk: https://mirror.git.trinitydesktop.org/gitea/TDE/arts/pulls/30/files |
| [13:34] | tde-bot: Page title: #30 - NBBY defined in sys/param.h - arts - TDE Gitea Workspace |
| [13:34] | denk: please review |
| [14:06] | denk: huh, now it has two commits |
| [14:09] | micheleC has quit (Read error: Connection reset by peer) |
| [14:33] | micheleC has joined |
| [14:33] | micheleC: it looks good but please squash the commits into one. |
| [14:33] | micheleC: @denk |
| [14:34] | micheleC has left |
| [14:49] | denk: squash is still overhead for my mind... |
| [14:49] | denk: https://mirror.git.trinitydesktop.org/gitea/TDE/arts/pulls/31 |
| [14:49] | tde-bot: Page title: #31 - user climits and CHAR_BIT instead on NBBY - arts - TDE Gitea Workspace |
| [14:49] | denk: just review a new PR |
| [15:51] | SlavekB has joined |
| [15:55] | Fat-Zer: denk: for the next time you can `git push -f` instead of creating a new branch/PR |
| [15:56] | Fat-Zer: *push to an existing branch |
| [16:05] | denk: yeah, I have some readme file about git, thaks to SlavekB and micheleC, every time I read it before doing something |
| [18:47] | SlavekB has quit (Quit: Kopete 0.12.7 : http://trinitydesktop.org) |
| [19:53] | SlavekB has joined |
| [21:13] | Fat-Zer has quit (Ping timeout: 265 seconds) |
| [21:40] | Fat-Zer has joined |
| [23:55] | SlavekB has quit (Quit: Kopete 0.12.7 : http://trinitydesktop.org) |
#tde-devs < 2025/12/30 > |