<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://www.baszerr.eu/lib/exe/css.php?s=feed" type="text/css"?>
<rss version="2.0">
    <channel xmlns:g="http://base.google.com/ns/1.0">
        <title>BaSzErr - blog:2016:01:07</title>
        <description></description>
        <link>https://www.baszerr.eu/</link>
        <lastBuildDate>Wed, 06 May 2026 08:50:57 +0000</lastBuildDate>
        <generator>FeedCreator 1.8</generator>
        <image>
            <url>https://www.baszerr.eu/lib/exe/fetch.php?media=wiki:dokuwiki.svg</url>
            <title>BaSzErr</title>
            <link>https://www.baszerr.eu/</link>
        </image>
        <item>
            <title>ar_vs._cmake</title>
            <link>https://www.baszerr.eu/doku.php?id=blog:2016:01:07:ar_vs._cmake</link>
            <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;ar_vs_cmake&quot;&gt;2016-01-07 - ar vs. cmake&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
some time ago i&amp;#039;ve came across an interesting “feature” of &lt;em&gt;ar&lt;/em&gt;&lt;sup&gt;&lt;a href=&quot;#fn__1&quot; id=&quot;fnt__1&quot; class=&quot;fn_top&quot;&gt;1)&lt;/a&gt;&lt;/sup&gt; – it does not store full paths to object files internally. instead it just keeps its name. most of the time this is not a problem. however, if you happen to have more files than command line can fit, creating archive need to be split into multiple calls: creating a libraries and then adding objects groups (multiple times, if needed). &lt;em&gt;cmake&lt;/em&gt; does that by default. now if you happen to have object files, named the same, but stored in different directories, and try to add such objects to a static library with &lt;em&gt;ar&lt;/em&gt;, you&amp;#039;ll end up overwriting old object file, stored inside the archive, with a new file, that just happened to have the same name.
&lt;/p&gt;

&lt;p&gt;
effect? linking error! it&amp;#039;s extremely user fiendly&lt;sup&gt;&lt;a href=&quot;#fn__2&quot; id=&quot;fnt__2&quot; class=&quot;fn_top&quot;&gt;2)&lt;/a&gt;&lt;/sup&gt; as you can clearly see your objects are being added to the archive, yet linker says implementation, stored there is missing!
&lt;/p&gt;

&lt;p&gt;
the only way i could think of, to overcome this coincidence of 3 random facts/rules/limitations, is to create helper libraries, that are small enough, to be linked into a single libraries, and then add these libraries as a dependency to “final” library, so that users will not need to be aware of this implementation detail.
&lt;/p&gt;

&lt;p&gt;
btw: if you think 32k is a lot, consider how long nested, auto-generated paths inside build directories, can be! it may not take that many files to trigger such behavior… but took over an hour to find. IT – every day something new! ;)
&lt;/p&gt;

&lt;/div&gt;
&lt;div class=&quot;footnotes&quot;&gt;
&lt;div class=&quot;fn&quot;&gt;&lt;sup&gt;&lt;a href=&quot;#fnt__1&quot; id=&quot;fn__1&quot; class=&quot;fn_bot&quot;&gt;1)&lt;/a&gt;&lt;/sup&gt; 
&lt;div class=&quot;content&quot;&gt;tool for creating static libraries on linux&lt;/div&gt;&lt;/div&gt;
&lt;div class=&quot;fn&quot;&gt;&lt;sup&gt;&lt;a href=&quot;#fnt__2&quot; id=&quot;fn__2&quot; class=&quot;fn_bot&quot;&gt;2)&lt;/a&gt;&lt;/sup&gt; 
&lt;div class=&quot;content&quot;&gt;it&amp;#039;s not a typo! ;) &lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 15 Jun 2021 20:09:19 +0000</pubDate>
        </item>
        <item>
            <title>networking_inside_docker</title>
            <link>https://www.baszerr.eu/doku.php?id=blog:2016:01:07:networking_inside_docker</link>
            <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;networking_inside_docker&quot;&gt;2016-01-07 - networking inside docker&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
since some time docker containers have whitelist of capabilities – i.e. they are not allowed to do certain things, unless explicitly stated. common case you can ran into is settings up networking inside a container – say a firewall. there are a lot of weird advices, including running insecure containers! the answer to this is however very simple – just add a proper capability, when starting your container:
&lt;/p&gt;
&lt;pre class=&quot;code bash&quot;&gt;docker run &lt;span class=&quot;re5&quot;&gt;--cap-add&lt;/span&gt;=NET_ADMIN blabala...&lt;/pre&gt;

&lt;p&gt;
and you&amp;#039;re done!
&lt;/p&gt;

&lt;/div&gt;
</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 15 Jun 2021 20:09:19 +0000</pubDate>
        </item>
        <item>
            <title>reviewer_s_finger</title>
            <link>https://www.baszerr.eu/doku.php?id=blog:2016:01:07:reviewer_s_finger</link>
            <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;reviewer_s_finger&quot;&gt;2016-01-07 - reviewer&amp;#039;s finger&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
&lt;a href=&quot;https://www.baszerr.eu/lib/exe/detail.php?id=blog%3A2016%3A01%3A07%3Areviewer_s_finger&amp;amp;media=blog:2016:01:07:computer_mouse.jpg&quot; class=&quot;media&quot; title=&quot;blog:2016:01:07:computer_mouse.jpg&quot;&gt;&lt;img src=&quot;https://www.baszerr.eu/lib/exe/fetch.php?w=300&amp;amp;tok=c39d47&amp;amp;media=blog:2016:01:07:computer_mouse.jpg&quot; class=&quot;mediaright&quot; align=&quot;right&quot; loading=&quot;lazy&quot; title=&quot;computer mouse (from https://upload.wikimedia.org/wikipedia/commons/a/aa/3-Tastenmaus_Microsoft.jpg)&quot; alt=&quot;computer mouse (from https://upload.wikimedia.org/wikipedia/commons/a/aa/3-Tastenmaus_Microsoft.jpg)&quot; width=&quot;300&quot; /&gt;&lt;/a&gt;
familiar with &lt;a href=&quot;https://en.wikipedia.org/wiki/tennis elbow&quot; class=&quot;interwiki iw_wp&quot; title=&quot;https://en.wikipedia.org/wiki/tennis elbow&quot;&gt;tennis elbow&lt;/a&gt; contusion? i bet that if you do enough code reviews you can get “reviewer&amp;#039;s finger” – a hurting finger, that just did far too many kilometers, while scrolling code during reviews. day after day. IT is a dangerous game, after all…
&lt;/p&gt;

&lt;/div&gt;
</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 15 Jun 2021 20:09:19 +0000</pubDate>
        </item>
    </channel>
</rss>
