0

Based on this instruction I try to build Telegram Desktop, but after running make $MAKE_THREADS_CNT I face a couple of these errors:

[  7%] Building C object Utilities/cmlibuv/CMakeFiles/cmlibuv.dir/src/fs-poll.c.o
In file included from /usr/include/x86_64-linux-gnu/sys/stat.h:446,
                 from /home/me/w/code/cpp/telegram/BuildPath/Libraries/cmake/Source/cmsys/SystemTools.hxx:15,
                 from /home/me/w/code/cpp/telegram/BuildPath/Libraries/cmake/Source/kwsys/SystemTools.cxx:21:
/usr/lib/gcc/x86_64-linux-gnu/8/include-fixed/bits/statx.h:38:25: error: missing binary operator before token "("
 #if __glibc_has_include ("__linux__/stat.h")
                         ^

I've read many Q&A here in Stack Overflow and out of it. I couldn't figure out what's wrong (even couldn't relate to this) and none of example cases matched my case in compiling Telegram Desktop.

I'm using Kubuntu 20.04 which has gcc v9, but I installed gcc v8 based on the mentioned instruction. Due to finding some change logs about __glibc_has_include in glibc, I even downloaded glibc source code, but couldn't figure out what's the issue.

Could you explain or lead me to a documentation to figure out what's wrong?

P.S. In the statx.h file I also see this:

/* Use "" to work around incorrect macro expansion of the
   __has_include argument (GCC PR 80005).  */
#if __glibc_has_include ("__linux__/stat.h")

but the file starts with a comment DO NOT EDIT THIS FILE. (though I tried to edit with no success!)

pedyram
  • 330
  • 1
  • 2
  • 11
  • 1
    I'm trying to understand your P.S., and my best guess is that you read "Use" as an instruction directed at you. It's not. That comment is describing the current state of affairs, directed at people who develop the package in question (Telegram Desktop). Quotes are already being used; there is nothing for you to do with that line. – JaMiT Oct 01 '20 at 23:44
  • 1
    I don't know enough about `__glibc_has_include` to say if the following is a duplicate but it certainly looks similar: [Building libwebrtc](https://stackoverflow.com/questions/60478315/building-libwebrtc). Different project being built, but the same symptom. I also noticed that your instructions are for Ubuntu 14.04 and an answer to the linked question suggests that something relevant changed between 14.04 and your version, 20.04. (I'm not recommending a downgrade, just noting that the instructions are out of date.) – JaMiT Oct 01 '20 at 23:53
  • Yes, I noticed the version difference and I didn't think downgrading would be sane. I even had another issue in previous steps and had to downgrade my `libgtk2.0-0` version and handle some dependency trade-offs. From other QAs it seems that maybe `__glibc_has_include` is not defined, but couldn't find any leads to tackle that. – pedyram Oct 02 '20 at 07:35

0 Answers0