Tdesktop: make[2]: *** No rule to make target '/usr/lib/libicutu.a', needed by 'codegen_numbers'.

Created on 2 Feb 2017  路  13Comments  路  Source: telegramdesktop/tdesktop

Steps to reproduce

  1. Follow the build tutorial up to the end when we finally compile Telegram
  2. Try to build either Release or Debug versions
  3. Get the error for no rule to make target /usr/lib/libicutu.a

Expected behaviour

The program to compile without errors.

Actual behaviour

Compilation fails

Configuration

Debian 8 64 bit

uname-a: Linux Tardis 3.16.0-4-amd64 #1 SMP Debian 3.16.39-1 (2016-12-30) x86_64 GNU/Linux

Version of Telegram Desktop:
1.06

Logs

eduardo@Tardis:~/TBuild/tdesktop/out/Release$ make
Scanning dependencies of target MetaLang__qt_moc
[  0%] mlmain.h..
[  0%] genlang.h..
[  0%] Built target MetaLang__qt_moc
Scanning dependencies of target MetaLang
[  0%] Building CXX object CMakeFiles/MetaLang.dir/home/eduardo/TBuild/tdesktop/Telegram/SourceFiles/_other/mlmain.o
[  0%] Building CXX object CMakeFiles/MetaLang.dir/home/eduardo/TBuild/tdesktop/Telegram/SourceFiles/_other/genlang.o
[  0%] Building CXX object CMakeFiles/MetaLang.dir/obj/gen/MetaLang/moc/moc_mlmain.o
[  0%] Building CXX object CMakeFiles/MetaLang.dir/obj/gen/MetaLang/moc/moc_genlang.o
make[2]: *** No rule to make target '/usr/lib/libicutu.a', needed by 'MetaLang'.  Stop.
CMakeFiles/Makefile2:649: recipe for target 'CMakeFiles/MetaLang.dir/all' failed
make[1]: *** [CMakeFiles/MetaLang.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

I have libicutu.a on /usr/lib/x86_64-linux-gnu/libicutu.a, so I tried to create a symlink with ln -s to /usr/lib;libicutu.a, but no dice :(

build help wanted

Most helpful comment

Workaround for Debian-based systems on amd64:

for libname in libicutu.a libicui18n.a libicuuc.a libicudata.a; do
    sudo ln -s /usr/lib/x86_64-linux-gnu/${libname} /usr/lib/${libname}
done

All 13 comments

Here are instructions for ubuntu: https://github.com/telegramdesktop/tdesktop/blob/master/doc/building-cmake.md

However, I don't know if they also work for debian

Try to add /usr/lib/x86_64-linux-gnu/ to library search path

@auchri This were the instructions I followed. Although they're for Ubuntu, in my experience, 99% of Ubuntu tutorials also work for Debian, so I decided to give it a shot.

@stek29 I think this directory is already on my search path. The output ofld --verbose | grep SEARCH_DIR | tr -s ' ;' \\012 (last option is just for formatting of output) is

eduardo@Tardis:~$ ld --verbose | grep SEARCH_DIR | tr -s ' ;' \\012
SEARCH_DIR("=/usr/x86_64-linux-gnu/lib64")
SEARCH_DIR("=/usr/local/lib/x86_64-linux-gnu")
SEARCH_DIR("=/usr/local/lib64")
SEARCH_DIR("=/lib/x86_64-linux-gnu")
SEARCH_DIR("=/lib64")
SEARCH_DIR("=/usr/lib/x86_64-linux-gnu")
SEARCH_DIR("=/usr/lib64")
SEARCH_DIR("=/usr/x86_64-linux-gnu/lib")
SEARCH_DIR("=/usr/local/lib")
SEARCH_DIR("=/lib")
SEARCH_DIR("=/usr/lib")

The /usr/lib/x86_64-linux-gnu/is already on the library search directories list.

@eduardosm I think it's statically linked, so it should be in search path at compilation time.

@stek29 Sorry to sound too newbie, but how do I specify the search path when I run a make? I know how to do this with ./configure, but it does not seem to work with make.

I tried to recompile gyp specifying the library search path, to check if when I run gyp/refresh.sh if the script parses the correct directory to the makefiles, but it didn't worked. Instead, I believe it made things worse, because now the error pops up earlier (although it's the exact same error):

eduardo@Tardis:~/TBuild/tdesktop/out/Release$ make
[  0%] Built target MetaLang__qt_moc
make[2]: *** No rule to make target '/usr/lib/libicutu.a', needed by 'MetaLang'.  Stop.
CMakeFiles/Makefile2:649: recipe for target 'CMakeFiles/MetaLang.dir/all' failed
make[1]: *** [CMakeFiles/MetaLang.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

@eduardosm Sorry, I haven't checked how Telegram builds for a long time, so I won't be able to help.

Workaround for Debian-based systems on amd64:

for libname in libicutu.a libicui18n.a libicuuc.a libicudata.a; do
    sudo ln -s /usr/lib/x86_64-linux-gnu/${libname} /usr/lib/${libname}
done

@leovp , this worked! The compilation continued. However, when make gets to the point of "Linking CXX executable Telegram", it hangs. I left the computer almost one and a half hours on this step and it didn't progressed further. I believe this is an issue with my computer, however, because it gets painfully sluggish at this point. htop shows g++ chugging 100% of CPU.

This step is really that time consuming?

Yes, it takes a long time if your computer has slow hardware (it also takes long on an up do date hardware)

@eduardowoj This happens that way because of the link time optimizations I guess. You can try building Debug version, it should work not that long. After that you can try to remove "-flto" flags in Telegram/gyp/telegram_linux.gypi and build without link time optimizations.

I have this problem too. in Ubuntu 16.04 How fix this:

sudo apt-get install libicu-dev

Then you can find these file in hard disk libicudata.a , libicui18n.a , libicutu.a , libicuuc.a and make the link for them in here :

/usr/lib/libicudata.a
/usr/lib/libicui18n.a
/usr/lib/libicutu.a
/usr/lib/libicuuc.a

for example:

ln -s /lib/i386-linux-gnu/libicudata.a /usr/lib/libicudata.a

now you can continue compile file.

Same issue on ubuntu 17.04 and solved by @leovp 's script,
Should be added to instructions...

@leovp sometimes it need to added -f flag for "ln"

Was this page helpful?
0 / 5 - 0 ratings

Related issues

edubxb picture edubxb  路  165Comments

RussianNeuroMancer picture RussianNeuroMancer  路  149Comments

meness picture meness  路  96Comments

beerisgood picture beerisgood  路  122Comments

kmare picture kmare  路  109Comments