Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Solved] xgettext becomes C++ ignorant

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
learnstepbystep
Posts: 11
Joined: 2020-07-21 08:25
Been thanked: 2 times

[Solved] xgettext becomes C++ ignorant

#1 Post by learnstepbystep »

Bookworm. (Edit: xgettext has the same issue in my another box installed with bullseye too.)

I am not sure since when xgettext started to unable to recognize C++.
Command xgettext -C -o t.pot -f main.cpp prints the following error:

xgettext: error while opening "static int caught_signal=-1;" for reading: No such file or directory

Where main.cpp follows:

Code: Select all

#include <signal.h> //sigaction
#include <curl/curl.h>
static int caught_signal=-1;
int main(int argc,char **argv)
{
	curl_global_init(CURL_GLOBAL_DEFAULT);
	for(int i=0;i < 2;++i){
		std::cerr << e.what() << std::endl;
	}
	curl_global_cleanup();
	return 0;
}
I have reinstalled packages gettext and gettext-base.
What else packages might be missing?
Last edited by learnstepbystep on 2023-11-28 09:57, edited 1 time in total.

learnstepbystep
Posts: 11
Joined: 2020-07-21 08:25
Been thanked: 2 times

Re: xgettext becomes C++ ignorant

#2 Post by learnstepbystep »

It's my fault.

Given my script:

Code: Select all

REF_POT=/tmp/ref$$.pot

find $1/cpp -maxdepth 1 -type f -name "*.cpp" -o -name "*.h" | xgettext --keyword=_:1,1t --keyword=N_:1,2,3t --keyword=translate:1,1t --keyword=translate:1,2,3t -C -o "$REF_POT" -f -

find $2 -maxdepth 1 -type f -name main.cpp | xgettext -j --keyword=_:1,1t --keyword=N_:1,2,3t --keyword=translate:1,1t --keyword=translate:1,2,3t -C -o "$REF_POT" -f -
If I give /tmp as the second argument, then the find $2 in the third command turns literally out to be find /tmp, which finds out nothing, and I get this weird error.

I can give /tmp/ as the second argument $2 to avoid this issue.

==Edit: Looking for a way to close this topic...==

Post Reply