[sr-dev] [kamailio/kamailio] Error building Kamailio in Gitlab.com cloud environment (#2228)

Ivan Ribakov notifications at github.com
Mon Feb 24 16:08:34 CET 2020


<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for bug reports.

If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:

  * http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:

  * http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev

Please try to fill this template as much as possible for any issue. It helps the developers to troubleshoot the issue.

If there is no content to be filled in a section, the entire section can be removed.

You can delete the comments from the template sections when filling.

You can delete next line and everything above before submitting (it is a comment).
-->

### Description

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 `make`. In short, sequence of steps can be summarised like this:
```
# 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
```

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 `MY_CUSTOM_FLAG` not being visible:

```
core/dprint.h:301:19: error: 'MY_CUSTOM_FLAG' undeclared (first use in this function)
```
(we're using patched Kamailio sources so don't get sidetracked by `MY_CUSTOM_FLAG` not being actually present in `core/dprint.h:301`)

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?


### Troubleshooting

#### Reproduction

<!--
If the issue can be reproduced, describe how it can be done.
-->

For the record, [here is the Gitlab ticket](https://gitlab.com/gitlab-org/gitlab/issues/198551#note_293261974) with further reproduction details and examples of successful and failing builds

### Additional Information

  * **Kamailio Version** - output of `kamailio -v`

Running the code from this repo's `5.1` branch: `git checkout -b 5.1 origin/5.1`

* **Operating System**:

<!--
Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...;
Kernel details (output of `uname -a`)
-->

Official Docker `centos:7` image


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2228
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20200224/d62d9f23/attachment-0001.html>


More information about the sr-dev mailing list