Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for custom dir layout #1

Open
seamus-45 opened this issue Aug 11, 2015 · 5 comments
Open

Add support for custom dir layout #1

seamus-45 opened this issue Aug 11, 2015 · 5 comments

Comments

@seamus-45
Copy link

Greetings,
I am a user of Alpine Linux
I compiled asterisk, unimrcp and asterisk-unimrcp from source. Unimrcp has support for dir layout configuration. I edited config.layout/dirlayout.xml and add LSB layout configuration, then configure with --prefix=/usr --enable-layout=lsb. Everything work flawlessly. But asterisk-unimrcp module pays no attention to these settings, and cannot load config unimrcpclient.xml. After some digging, I realized that the module uses apt_default_dir_layout_create function and without patching code no chance to get what I want.

My current layout is:

var value
confdir /etc/unimrcp
plugindir /usr/lib/unimrcp
logdir /var/log
datadir /usr/share/unimrcp
vardir /var/run/unimrcp

P.S. Unfortunately Alpine Linux build system prevents to isntall packages in other places than /{,usr}, e.g. /opt/unimrcp or /usr/local/unimrcp. I guess this is due to the fact that the Alpine is very simple and built on musl.

@achaloyan
Copy link
Contributor

Greetings,

Thanks for trying out directory layout options available for UniMRCP. You are right the Asterisk module uses the default layout. If you can take a closer look and make the necessary changes, I'd be glad to push them upstream. Feel free to ask for help, if needed.

@seamus-45
Copy link
Author

I would be happy to help, but do not have any experience with C or GNU Build System. My current dirty solution is hardcode my layout in a apt_default_dir_layout_create function. So we need a volunteer.

sfgeorge pushed a commit to sfgeorge/asterisk-unimrcp that referenced this issue May 3, 2016
…ts-teardown-fix

NeoSpeech MRCPv1 compatability fix: send explicit ANNOUNCE:STOP prior to TEARDOWN of TTS
@adamgoose
Copy link

@seamus-45 I'm using the latest alpine docker image, and can apk add asterisk. However, when trying to build unimrcp deps from source, I get the following...

...
/bin/bash /opt/unimrcp-deps-1.4.0/libs/apr/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DLINUX -D_REENTRANT -D_GNU_SOURCE   -I./inc
lude -I/opt/unimrcp-deps-1.4.0/libs/apr/include/arch/unix -I./include/arch/unix -I/opt/unimrcp-deps-1.4.0/libs/apr/include/arch/unix -I/opt/unimrcp-d
eps-1.4.0/libs/apr/include -I/opt/unimrcp-deps-1.4.0/libs/apr/include/private  -o threadproc/unix/thread.lo -c threadproc/unix/thread.c && touch thre
adproc/unix/thread.lo
threadproc/unix/thread.c: In function 'apr_thread_name_set':
threadproc/unix/thread.c:339:46: error: missing binary operator before token "("
 #if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 12)
                                              ^
make[1]: *** [/opt/unimrcp-deps-1.4.0/libs/apr/build/apr_rules.mk:206: threadproc/unix/thread.lo] Error 1
make[1]: Leaving directory '/opt/unimrcp-deps-1.4.0/libs/apr'
make: *** [/opt/unimrcp-deps-1.4.0/libs/apr/build/apr_rules.mk:118: all-recursive] Error 1

Any thoughts on this? it looks like there's a bug in the patched version of the deps. Perhaps I should be installing the deps in a different manner?

@achaloyan
Copy link
Contributor

I do not see anything apparently wrong on the error line. What is the version of gcc on your Linux distribution. And more interestingly, how is __GLIBC_PREREQ() defined in features.h typically located in /usr/include directory. Below is a relevant part matching glibc 2.12.

/* Major and minor version number of the GNU C library package. Use
these macros to test for features in specific releases. */
#define GLIBC 2
#define GLIBC_MINOR 12

#define __GLIBC_PREREQ(maj, min)
((GLIBC << 16) + GLIBC_MINOR >= ((maj) << 16) + (min))

@seamus-45
Copy link
Author

@adamgoose As I mentioned above, Alpine is built on musl but not on glibc. Thus you will not be able to build unpatched apr bundled with unimrcp-deps package. Instead of this, you should build every dependency separately and use patched apr/apr-util from aports. Overall, I have achieved this success, but many time ago. Below you can see versions which I used:

x x
aports 3.2-stable
apr(aports) 1.5.1
apr-util(aports) 1.5.4
asterisk(aports) 13.3.2
unimrcp 1.3.0
asterisk-unimrcp 1.3.1
sofia-sip 1.12.11 (g8cb7baa)

It is somewhat difficult, because you will have to write APKBUILD by yourself. Good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants