GithubHelp home page GithubHelp logo

Building Docker Alpine:3.7 about td HOT 10 CLOSED

tdlib avatar tdlib commented on May 1, 2024 2
Building Docker Alpine:3.7

from td.

Comments (10)

levlam avatar levlam commented on May 1, 2024 1

As a workaround, you can add "|| 1" to line Stat.cpp:50:
#if defined(_BSD_SOURCE) || defined(_SVID_SOURCE) || _POSIX_C_SOURCE >= 200809L || _XOPEN_SOURCE >= 700 || TD_EMSCRIPTEN || 1

We will rewrite that condition in more robust way.

from td.

isopen avatar isopen commented on May 1, 2024

Try to bypass the mountaineering with this
https://github.com/isopen/docker/blob/master/tdlib/Dockerfile.debian

from td.

MetalBlueberry avatar MetalBlueberry commented on May 1, 2024

Hi @isopen
That docker image is based on debian:9, thus it compiles without problem.
also, I can compile it using an ubuntu based image, but the idea is to use Alpine.
any other suggestion?

from td.

isopen avatar isopen commented on May 1, 2024

I understand that we are not looking for easy ways. We want to minimize the image :)
Then try this:

tdlib/td/tdutils/td/utils/port/Stat.cpp54:55
change it so:
func Stat from_native_stat(const struct ::stat &buf)
...
#else
  res.mtime_nsec_ = buf.st_mtime * 1000000000ll + buf.st_mtim.tv_nsec;
  res.atime_nsec_ = buf.st_atime * 1000000000ll + buf.st_atim.tv_nsec;
#endif
...

Then run https://github.com/isopen/docker/blob/master/tdlib/Dockerfile.alpine

from td.

isopen avatar isopen commented on May 1, 2024

Hi @MetalBlueberry
Do this in the sys/stat.h structure
st_mtimensec
st_atimensec
/usr/include/sys/stat.h package musl-dev
Works are not much :)))
image

from td.

MetalBlueberry avatar MetalBlueberry commented on May 1, 2024

Hi @isopen

Yesterday a let my computer compiling overnight with the fix

tdlib/td/tdutils/td/utils/port/Stat.cpp54:55
change it so:
func Stat from_native_stat(const struct ::stat &buf)
...
#else
  res.mtime_nsec_ = buf.st_mtime * 1000000000ll + buf.st_mtim.tv_nsec;
  res.atime_nsec_ = buf.st_atime * 1000000000ll + buf.st_atim.tv_nsec;
#endif
...

It got stuck at 100% with no error msg, but the processor was doing something.( 75%~ avg usage)
I think that it was a docker issue with the memory in my system, I'm using a laptop Intel Core i5-5200U with 4GB DDR3.
any way, I will try again with a better computer as soon as I have time.

Thank you for your time!

from td.

isopen avatar isopen commented on May 1, 2024

Try this bike: #6
On your computer should be -j 2, but the RAM will definitely take off and everything will hang on the n-th time interval.

I think ideally for a comfortable build you need 12 cores and 32GB RAM.
In order not to bother at all and not to peek, then 24 cores and 64GB RAM.
The iron market did not take off, but the processing volumes definitely took off.
But in practice, I can say with certainty that this iron can also be loaded, but not so often :)

Concerning the assembly under Alpine at the moment, @levlam suggested a more laconic solution, but the way of work will be the same.

from td.

MetalBlueberry avatar MetalBlueberry commented on May 1, 2024

I think that this issue can be closed.

from td.

isopen avatar isopen commented on May 1, 2024

You can reopen this report :) @levlam Not yet fixed
isopen/docker#2
isopen/docker#1

from td.

levlam avatar levlam commented on May 1, 2024

The issue should be fixed in TDLib 1.2.0.

from td.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.