majn / telegram-purple

Adds support for Telegram to Pidgin, Adium, Finch and other Libpurple based messengers.
GNU General Public License v2.0
735 stars 81 forks source link

make failed because sed called with wrong options #562

Closed arifsaha closed 3 years ago

arifsaha commented 3 years ago

I compiled v1.4.4 in macOS and make process failed because wrong options for sed:

make: Entering directory `/opt/local/var/macports/build/_Users_Shared_macports_ports_net_purple-telegram/purple-telegram/work/teleg
ram-purple-1.4.4'
cd tgl && ./configure -q --disable-openssl --disable-extf CFLAGS="-pipe -Os -arch x86_64" LDFLAGS="-L/opt/local/lib -Wl,-headerpad_
max_install_names -arch x86_64 -L/usr/lib -L/usr/lib"
/opt/local/bin/msgfmt -cf -o po/bg.mo po/bg.po >/dev/null 2>&1
/opt/local/bin/msgfmt -cf -o po/cs_CZ.mo po/cs_CZ.po >/dev/null 2>&1
sed -re 's/ de_DE/ de/' po/de_DE.po > po/de.po
/opt/local/bin/msgfmt -cf -o po/es.mo po/es.po >/dev/null 2>&1
sed: illegal option -- r
usage: sed script [-Ealn] [-i extension] [file ...]
sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]
make: *** [po/de.po] Error 1
make: *** Waiting for unfinished jobs....
Refresh commit.h
make: Leaving directory `/opt/local/var/macports/build/_Users_Shared_macports_ports_net_purple-telegram/purple-telegram/work/telegram-purple-1.4.4'
Command failed:  cd "/opt/local/var/macports/build/_Users_Shared_macports_ports_net_purple-telegram/purple-telegram/work/telegram-purple-1.4.4" && /usr/bin/make -j4 -w all

Here is the offending code in the Makefile:

po/de.po: po/de_DE.po
        sed -re 's/ de_DE/ de/' $< > $@

po/it.po: po/it_IT.po
        sed -re 's/ it_IT/ it/' $< > $@

po/pl.po: po/pl_PL.po
        sed -re 's/ pl_PL/ pl/' $< > $@

po/ru.po: po/ru_RU.po
        sed -re 's/ru_RU/ru/' $< > $@

Earlier releases until v1.3.1 were compiled without problem.

arifsaha commented 3 years ago

I confirm that once that error fixed (I use perl to edit the Makefile.in), the code was successfully built and installed, then has been working properly.

BenWiederhake commented 3 years ago

So what would did you do to make it work? sed -Ee I guess?

Also, have a look at tdlib-purple.