<h3>Description</h3>
<p>We're considering migrating our Kamailio-based product to Gitlab and attempted to setup a PoC of a build pipeline using Gitlab's CI capabilities. We used the same Docker build image but ran into some unexpected problems when running <code>make</code>. In short, sequence of steps can be summarised like this:</p>
<pre><code># 1. Generating build config files
make Q=0 cfg PREFIX=/usr/local LOCALBASE=/usr/local cfg_prefix=/tmp doc_prefix=/tmp modules_dirs=modules group_include=standard 'include_modules=inesrp inkeepalive sanity json sctp htable avpops uac uac_redirect rtimer dialog tls' 'skip_modules=stun sipt rtpproxy auth_diameter msrp qos seas siptrace sipcapture xhttp xhttp_rpc acc_diameter call_control mediaproxy topoh topos nat_traversal sms smsops jsonrpcs ss7ops ctl dmq dmq_usrloc mqueue rtpengine malloc_test mangler nosip blst app_sqlang app_jsdt auth_xkeys cfg_rpc sca sctp evrexec exec sdpops sipdump nathelper path pike'
# 2. Since MY_CUSTOM_FLAG variable is custom and is not set by default, injecting it into src/Makefile.defs
sed -i 's/C_DEFS=.*/&\n\o011 -DMY_CUSTOM_FLAG \\/' src/Makefile.defs  
# 3. should succeed
make Q=0
</code></pre>
<p>At this point we expected build to succeed since it's exactly the same sequence of steps as we have been running for almost a year now, but what we got was build failures due to <code>MY_CUSTOM_FLAG</code> not being visible:</p>
<pre><code>core/dprint.h:301:19: error: 'MY_CUSTOM_FLAG' undeclared (first use in this function)
</code></pre>
<p>(we're using patched Kamailio sources so don't get sidetracked by <code>MY_CUSTOM_FLAG</code> not being actually present in <code>core/dprint.h:301</code>)</p>
<p>Although clues seem to be pointing in the direction of new cloud CI environment being the culprit, we're not really sure how to approach this issue and where to start debugging from. Any suggestions?</p>
<h3>Troubleshooting</h3>
<h4>Reproduction</h4>

<p>For the record, <a href="https://gitlab.com/gitlab-org/gitlab/issues/198551#note_293261974" rel="nofollow">here is the Gitlab ticket</a> with further reproduction details and examples of successful and failing builds</p>
<h3>Additional Information</h3>
<ul>
<li><strong>Kamailio Version</strong> - output of <code>kamailio -v</code></li>
</ul>
<p>Running the code from this repo's <code>5.1</code> branch: <code>git checkout -b 5.1 origin/5.1</code></p>
<ul>
<li><strong>Operating System</strong>:</li>
</ul>

<p>Official Docker <code>centos:7</code> image</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2228?email_source=notifications&email_token=ABO7UZNOLNCAVMUDOM56UFLREPPHFA5CNFSM4K2KDUOKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IPYIJXA">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZIRXN3DQDWJUER7UHDREPPHFANCNFSM4K2KDUOA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZLESTM2RT3CB3SOE5TREPPHFA5CNFSM4K2KDUOKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IPYIJXA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2228?email_source=notifications\u0026email_token=ABO7UZNOLNCAVMUDOM56UFLREPPHFA5CNFSM4K2KDUOKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IPYIJXA",
"url": "https://github.com/kamailio/kamailio/issues/2228?email_source=notifications\u0026email_token=ABO7UZNOLNCAVMUDOM56UFLREPPHFA5CNFSM4K2KDUOKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IPYIJXA",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>