Build Everything From Source: A Case Study in Fear - Dave Steffen - CppCon 2020

preview_player
Показать описание
---
Two years ago Titus Winters gave a talk at Pacific++ called "C++ Past vs. Future" where he described the perils of linking files compiled at different times in different ways, which can easily lead to One-Definition-Rule violations and undefined behavior. This is not an abstract or theoretical problem, nor one restricted to C++, but is a present menace waiting in our build systems and in our operating system's prebuilt libraries. As a public service, I present a case study of a compiler upgrade, a deeply mysterious bug, and a popular open-source project with a C interface that cannot be delivered as a pre-built library without putting users in peril.

---
Dave Steffen completed his Ph.D. in theoretical physics at Colorado State University in 2003, and promptly changed course for a career in software engineering. He has worked primarily in defence and aerospace, and is currently a technical lead at SciTec Inc.'s Boulder office. For reasons unknown, he has turned out to be the expert, champion, and occasional street-corner evangelist for unit testing at most of the companies he has ever worked at.

---

*-----*
*-----*
Рекомендации по теме
Комментарии
Автор

i agree, this is why we need proper package manager
otherwise we doomed to repeat the same issues, over and over and over

Hoowwwww
Автор

is standard libraries build each time we compile?

antonfernando
Автор

2:20 It would be really cool to see this in more detail.

TimeoutMegagameplays
Автор

Yeah much easier said than done. It is why I am currently working on a new build system to simplify building open source libraries into my projects.

BeAManPodkast
Автор

I wish i would even know all the dependencies. Large libraries are a real mess.

llothar
Автор

does not scale. What about people that have to use libs like Qt. Build from source, all the time?
No, you do not rebuild all your code + dependencies all the time.
you rebuild on toolchain update, than you distribute the binaries,
As always, there are exceptions, e.g. if you are super rich and build time is a solved problem because you just add X servers in your cloud ;-)

HaraldAchitz
Автор

Terrible advice in general. you need a deep expertise to make efficient builds for every dependency. Suppose you have some app with ffmpeg and Qt deps. Real highlevel app probably will have 20 of them. You will screw you performance easily without knowing it. So, start building your deps from source only if you have enough expertise to fix any issue with it.

mapron
Автор

And now this is why I make my own replacement for everything and stick it in a Freestanding C++ based library

ludoviclagouardette