Summary: | ASTERISK-25682: Unable to Make with imap support | ||
Reporter: | Daniel Journo (journo) | Labels: | |
Date Opened: | 2016-01-10 17:54:30.000-0600 | Date Closed: | 2016-01-14 04:19:06.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Applications/app_voicemail/IMAP |
Versions: | 13.6.0 | Frequency of Occurrence | Constant |
Related Issues: | |||
Environment: | Centos 6 | Attachments: | |
Description: | Tested using imap-2007e and imap-2007f from http://www.washington.edu/imap/
Try configuring using the following line: {noformat} ./configure -with-imap=/usr/src/imap-2007e --enable-dev-mode {noformat} In menuselect, select IMAP for Voicemail storage. The Make results in these errors:- With --enable-dev-mode {noformat} [CC] app_voicemail.c -> app_voicemail.o cc1: warnings being treated as errors In file included from /usr/src/imap-2007e/c-client/osdep.h:63, from /usr/src/imap-2007e/c-client/c-client.h:42, from app_voicemail.c:98: /usr/src/imap-2007e/c-client/env_unix.h:71: error: function declaration isn’t a prototype make[1]: *** [app_voicemail.o] Error 1 make: *** [apps] Error 2 {noformat} Without --enable-dev-mode {noformat} [CC] app_voicemail.c -> app_voicemail.o In file included from /usr/src/imap-2007f/c-client/osdep.h:63, from /usr/src/imap-2007f/c-client/c-client.h:42, from app_voicemail.c:98: /usr/src/imap-2007f/c-client/env_unix.h:71: warning: function declaration isn’t a prototype [LD] app_voicemail.o -> app_voicemail.so /usr/bin/ld: /usr/src/imap-2007f/c-client/c-client.a(osdep.o): relocation R_X86_64_32 against `server_input_wait' can not be used when making a shared object; recompile with -fPIC /usr/src/imap-2007f/c-client/c-client.a: could not read symbols: Bad value collect2: ld returned 1 exit status make[1]: *** [app_voicemail.so] Error 1 make: *** [apps] Error 2 {noformat} | ||
Comments: | By: Asterisk Team (asteriskteam) 2016-01-10 17:54:33.556-0600 Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report. Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process]. By: Rusty Newton (rnewton) 2016-01-11 18:53:13.801-0600 I can't reproduce this. How did you build the IMAP library? What versions of openssl-devel and pam-devel do you have? By: Daniel Journo (journo) 2016-01-12 14:43:25.950-0600 I retried it on a fresh server and it's building correctly. Not sure what's wrong with the other server. You can close this. By: Joshua C. Colp (jcolp) 2016-01-12 19:29:29.554-0600 Closed per request. By: Daniel Journo (journo) 2016-01-13 18:24:14.566-0600 Still having problems here. Steps to reproduce: - Install a fresh copy of Centos 6.7 - Download imap from ftp://ftp.cac.washington.edu/imap/imap-2007f.tar.gz to /usr/src/imap-2007f.tar.gz - Extract and run 'make lr5' - Download asterisk 13, extract and run the install_prereq script. - Configure with this: ./configure -with-imap=/usr/src/imap-2007f - Run 'make menuselect' and select Imap storage for VM - Run 'make' and the issue occurs I've got this on three separate machines including the one I set up for coding. By: Asterisk Team (asteriskteam) 2016-01-13 18:24:15.047-0600 This issue has been reopened as a result of your commenting on it as the reporter. It will be triaged once again as applicable. By: Daniel Journo (journo) 2016-01-13 18:26:43.686-0600 Occuring with and without --enable-dev-mode now By: Walter Doekes (wdoekes) 2016-01-14 03:37:11.601-0600 {quote} /usr/src/imap-2007e/c-client/env_unix.h:71: error: function declaration isn’t a prototype {quote} That's because of gcc -Wall -Werror. Line 71 holds this: {noformat} char *sysinbox (); {noformat} Old fashioned function definitions without parameters meant "undefined amount of parameters". If you mean zero parameters -- which they do -- you should do: {noformat} char *sysinbox (void); {noformat} That explains your first error. And it can be circumvented by removing the -Werror (e.g. by not using enable-dev-mode). Or by using a different compiler. My gcc-4.8 doesn't seem to mind. By: Walter Doekes (wdoekes) 2016-01-14 03:48:33.685-0600 {quote} /usr/bin/ld: /usr/src/imap-2007f/c-client/c-client.a(osdep.o): relocation R_X86_64_32 against `server_input_wait' can not be used when making a shared object; recompile with -fPIC /usr/src/imap-2007f/c-client/c-client.a: could not read symbols: Bad value {quote} Your method of installation is flawed. Normally Asterisk expects shared libraries for imap. For the imap lib, you would: * get it to make a shared library * make it * install it (to one of the directories found in /etc/ld.so.conf) The above process is usually done with: * ./configure [--enable-shared] [--prefix=/usr/local] * make * sudo make install But your downloaded package does not have any configure. It may work without shared libs, but you'll still need -fPIC. Try appending it manually when making: {noformat} make clean make EXTRACFLAGS=-fPIC lr5 {noformat} By: Daniel Journo (journo) 2016-01-14 03:56:54.195-0600 Thanks. I'll give that a try in an hour. Are you aware of any imap library that includes ./configure and 'make install' ? By: Walter Doekes (wdoekes) 2016-01-14 04:03:34.323-0600 Why don't you use a packaged version? My debians/ubuntus all have some form of imaplib: {noformat} walter@walter-desktop:0:~$ dpkg -S /usr/include/c-client/env_unix.h libc-client2007e-dev: /usr/include/c-client/env_unix.h walter@walter-desktop:0:~$ apt-cache show libc-client2007e-dev | grep imap Source: uw-imap Filename: pool/universe/u/uw-imap/libc-client2007e-dev_2007f~dfsg-2_amd64.deb Homepage: http://www.washington.edu/imap/ {noformat} The OS packages that stuff for your convenience. Use it. By: Daniel Journo (journo) 2016-01-14 04:18:55.578-0600 Thanks. That built successfully. |