Freeswitch is installed and working as it should. Now i want to install perl module(mod_perl) for that i have uncomment the line
'languages/mod_perl' in freeswitch/modules.conf
and in uncomment the line
'<load module="mod_perl"/>' in /usr/local/freeswitch/conf/autoload_configs/modules.conf.xml
and i am trying this but getting this error,
make mod_perl-install
Error:: /usr/bin/ld: /usr/local/lib/perl5/5.22.1/x86_64-linux/CORE/libperl.a(op.o): relocation R_X86_64_32 against `PL_memory_wrap' can not be used when making a shared object; recompile with -fPIC
I have tried to recompile with '-fPIC' as suggested by the system with these different ways, but without any success,
./configure CONFIGURE_CFLAGS=-fPIC
./configure CONFIGURE_CFLAGS=-fPIC --with-pic
./configure --disable-file --without-pic --disable-shared
Even change the variable in Makefile
from CXXFLAGS = -g -O2
to CXXFLAGS = -fPIC
Yet not able to install mod_perl in Freeswitch 1.6.5.
Any help would be appreciated.
Thanks,
Devang
=============
Okay, got the solution::
Somehow perl's latest version 5.22.1 is not going well with Freeswitch 1.6.5
so i used 5.20.2 and after that try to install mod_perl and i got success.
Thanks though.
solution to your problem is:
install the perl with thread option.
Related
My build fails with the following linker error message:
FAILED: : && /usr/bin/g++ -Wall -Wextra -Werror -g -fsanitize=undefined,address -Wno-unused-parameter -fsanitize=undefined,address -rdynamic *.o -o SCE -Wl,-rpath,/opt/qt59/lib /opt/qt59/lib/libQt5Widgets.so.5.9.1 /usr/local/lib/libprotobuf.a -lpthread -lutil -lgrpc++ /opt/qt59/lib/libQt5Gui.so.5.9.1 /opt/qt59/lib/libQt5Core.so.5.9.1 && :
/usr/bin/x86_64-linux-gnu-ld: unrecognized option '--push-state--no-as-needed'
You can see the full build log here. The error is in line 2211 and versions are printed in lines 2104ff.
Which tool causes the error?
Is gcc 7.3.0 using an incorrect linker flag? The ld documentation indicates that --push-state and --no-as-needed are separate commands.
Is ld 2.28 too old to understand the linker flag? The change log doesn't list anything that seems related.
The command && /usr/bin/g++ looks odd, it should be /usr/bin/g++. Using make instead of ninja shows the same linking error.
It builds correctly on Debian testing which is using gcc 7.3.0 as well and ld 2.30, but there doesn't seem to be a working binutils-2.30 ppa for Ubuntu Trusty.
How do I successfully build my project on Travis?
GCC 7 is fixed with 7.3.0-16ubuntu3 (tested on Ubuntu 18.04). This version is available though the Ubuntu Toolchain Test PPA (for 16.04.1 and 14.04).
Tested with Make only, but it should work with Ninja too. Both Sanitizer, ASan and UBsan, enabled.
There's not much related to this problem in the changelog though:
gcc-7 (7.3.0-16ubuntu3) bionic; urgency=medium
Update to SVN 20180415 (r259389) from the gcc-7-branch.
Fix PR libstdc++/85222.
Remove our own PR libstdc++/85222 backport.
Update:
GCC 7 (7.3.0-16ubuntu3) is still broken on Ubuntu 16.04 and earlier.
What you can do to workaround this:
A. Update to Ubuntu 18.04
The problem is fixed on Ubuntu 18.04 (LTS)'s Gcc7.
B. Dockerize and update to Ubuntu 18.04
If an update is not possible, eg. running on a CI system, it's still an option to use Docker and an up-to-date Ubuntu.
C. Disable UB Sanitizer
The Problem occurs only when using GCC7 with UB Sanitizer enabled. As tobias-brĂ¼ll noted in the comments: Turning the UB Sanitizer off prevents the error.
D. Use Gold Linker
Another workaround posted by makerj: Using the Gold Linker doesn't cause the problem.
Eg. on CMake pass it through the CMAKE_EXE_LINKER_FLAGS:
cmake -DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=gold ..
If option D (from ollo's answer) is not working for you try next commands:
sudo add-apt-repository ppa:jonathonf/binutils --yes
sudo apt-get update -qq --yes
sudo apt-get install -qq --yes --force-yes binutils
This is from: https://github.com/Project-OSRM/osrm-backend/blob/master/scripts/travis/before_install.x86_64-asan.sh
And the issue was discribed here: https://github.com/Project-OSRM/osrm-backend/issues/3216
I'm trying to compile my OpenMP program, but it doesn't work, this error message shows:
fatal error: 'omp.h' file not found
I've tried the solutions for this problem here, but nothing worked with me.
please help
I'm Mac user
You probably need to reinstall with:
brew reinstall gcc --without-multilib
Then you need to make sure you use the homebrew version of gcc (rather than anything Apple supplies) by running gcc-5 rather than plain gcc. You can check its name and version by running the following because homebrew normally always installs everything to /usr/local/bin:
ls /usr/local/bin/gcc*
Finally, you need to add the -fopenmp flag to your compiler invocation to tell the compiler to do the OpenMP thing.
So, your command will look like:
gcc-5 -fopenmp program.c -o program
Unfortunately I'm forced to use gcc-4.1 and I'm using debian wheezy. Since gcc-4.1 is not in repository I'm trying to build gcc from sources.
But I'm getting compiling error:
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libc.a when searching for -lc
/usr/bin/ld: i386:x86-64 architecture of input file `/usr/lib/x86_64-linux-gnu/crti.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `/usr/lib/x86_64-linux-gnu/crtn.o' is incompatible with i386 output
It looks that ld is picking wrong version of libraries, but I checked my /usr/lib32 and /usr/lib/x86_64-linux-gnu/ and it contains those files:
/usr/lib32/libc.a
/usr/lib32/libc.so
/usr/lib32/crtn.o
/usr/lib32/crti.o
/usr/lib/x86_64-linux-gnu/libc.a
/usr/lib/x86_64-linux-gnu/libc.so
/usr/lib/x86_64-linux-gnu/crtn.o
/usr/lib/x86_64-linux-gnu/crti.o
And ld should have access to them
~$ echo $LIBRARY_PATH
/usr/lib/x86_64-linux-gnu:/usr/lib32/
So I have no idea where the problem is.
I managed to work around the problem.
Run configure with:
./configure --disable-multilib ...
But than I encountered another problem with makeinfo, if you have newer version >=4.10 than it might not be found by configure. So simple fix in generated makefile worked for me:
Change this line:
MAKEINFO = /home/lecopivo/Downloads/gcc412/gcc412/gcc-4.1.2/missing makeinfo
To this:
MAKEINFO = makeinfo
I found this helpful.
LD_LIBRARY_PATH is only for running programs already linked.
You probably need to set LDFLAGS when you configure gcc:
./configure LDFLAGS="-L/usr/lib32" .....
It might be LDFLAGS_FOR_HOST or LIBS or something like that though.
I had this problem recently and finally solved it this way:
ln -s /usr/lib32 /usr/lib/i386-linux-gnu
Notes:
I assumed you do not have /usr/lib/i386-linux-gnu directory in your 64bit linux. If this directory exists and is empty, please delete it and make the above link.
If the directory already exists and is not empty, you have to make links inside it for (32bit) libraries which cause build error one by one; e.g.:
ln -s /usr/lib32/crti.o /usr/lib/i386-linux-gnu/crti.o
ln -s /usr/lib32/crtn.o /usr/lib/i386-linux-gnu/crtn.o
...
If 32bit development libraries are not installed, you may have to install them first. I've searched different forums and found that installing following set of packages in ubuntu will provide them:
libc6-dev libc6-dev-i386
gcc-multilib g++-multilib
zlib1g-dev lib32z1-dev
libncurses5-dev lib32ncurses5-dev libncursesw5-dev lib32ncursesw5-dev
Also adjust LD_LIBRARY_PATH and LIBRARY_PATH variables so that they contain /usr/lib/i386-linux-gnu and /usr/lib/x86_64-linux-gnu (i.e. multiarch lib-dirs). I am not sure which one of above variables is effective, so I adjust both of them the same.
If you use ./configure --disable-multilib as it is frequently suggested on web, though gcc will be built, but when you want to use that gcc for compiling e.g. legacy grub, you probably get error of "gcc cannot build executable" (or such).
Optionally, you can make similar linking for these pair of libdirs:
ln -s /lib32 /lib/i386-linux-gnu
Doing so, I managed to compile gcc-3.4.6 in a Ubuntu 16.04.6-amd64 used for compiling old 32bit programs like SDL 1.2 and legacy GRUB4DOS 0.4.4.
Also take a look at my answer to similar (though opposite) error here.
Good luck.
After ./configure asterisk in centos I type make command but getting the following error
/usr/bin/ld: /usr/local/lib/liblua.a(lapi.o): relocation R_X86_64_32 against `luaO_nilobject_' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/liblua.a: could not read symbols: Bad value
I resolved the problem. I was compiling on 64 bit platform, but
/usr/local/lib/liblua.a is 32 bit. so I just disable it make menuselect.
your problem seems to be the lua library. if you're on centos, try
yum install lua lua-devel
and then rerun your ./configure on asterisk.
I recently discovered Ruby Shoes, which sounds rather useful for a beginner like me. The only the problem is that my laptop is x64, while the only Linux package is i686. I tried it anyway and it didn't work for me, I kept getting an error. I didn't expect it to work, of course, but is there still a way to get Shoes on x64 Linux? Thanks!
There doesn't appear to be a 64-bit package for Linux, so if your distro doesn't package shoes you'll need to compile it yourself. This isn't as scary as it sounds!
First, make sure you have the proper development libraries:
Shoes relies on Cairo, Pango, libungif, libjpeg, GTK+ 2.0, and Ruby,
as well as GCC and its linker.
To install all of these libraries on Ubuntu or Debian:
# aptitude install libcairo2-dev libpixman-1-dev libpango1.0-dev \
libungif4-dev libjpeg62-dev libgtk2.0-dev vlc libvlc-dev \
libsqlite3-dev libcurl4-openssl-dev ruby1.8-dev rake
(On Ubuntu older than 8.10, actually you'll need libvlc0-dev.)
To install these libraries on Fedora:
# yum install -y giflib-devel cairo-devel libpixman-devel \
pango-devel libjpeg-devel gtk2-devel sqlite-devel vlc-devel \
libcurl-devel ruby-devel
I can get more specific if I knew what distribution you're using. Once you're ready, grab the tarball from shoooes.net and unpack it.
Then, enter the directory and run
make
this will build the project. Assuming this completes successfully, run
make install
If you need further help compiling this, consider joining the mailing list
Send a message to shoes AT code.whytheluckystiff.net
Cc: why AT whytheluckystiff.net
or #shoes on irc.freenode.net
I'm using Fedora Core 10. Here's what I get when I attempt building it.
$ ~/shoes-0.r1134
bash: /home/Alex/shoes-0.r1134: is a directory
$ make
make: *** No targets specified and no makefile found. Stop
Alternatively...
$ make shoes-0.r1134
make: Nothing to be done for `shoes-0.r1134'.
Also, I've looked in the repo's, and Ruby Shoes isn't in it.
I tried the instructions above. I got
[nathan#ebisu ~/tmp/shoes-0.r1134] make
build options: shoes raisins (0.r1134) [x86_64-linux]
CC = cc
RUBY = /usr
OPTIONS =
CC shoes/app.c
CC shoes/canvas.c
CC shoes/effects.c
CC shoes/image.c
CC shoes/internal.c
CC shoes/ruby.c
CC shoes/world.c
CC shoes/native/gtk.c
CC shoes/http/curl.c
CC -o dist/libshoes.so
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/libjpeg.so when searching for -ljpeg
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/libjpeg.a when searching for -ljpeg
CC bin/main.c
CC -o dist/shoes-bin
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/libjpeg.so when searching for -ljpeg
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/libjpeg.a when searching for -ljpeg
cp: cannot stat `/usr/lib/libruby.so': No such file or directory
make: *** [dist/shoes.launch] Error 1
Obviously I do have libjpeg installed.