LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   finding libpcre.so.3 has to be easier way (https://www.linuxquestions.org/questions/linux-general-1/finding-libpcre-so-3-has-to-be-easier-way-641312/)

mtdew3q 05-10-2008 02:20 PM

finding libpcre.so.3 has to be easier way
 
hi-

# /home/thirdshift/abyssws/htdocs # haxelib install flex
Called from EReg.hx line 31
Uncaught exception - load.c(223) : Failed to load library : /usr/lib/neko/regexp.ndll (libpcre.so.3: cannot open shared object file: No such file or directory)

i have pcre and pcre-devel checked in package mgr as installed.

the .so file is in the pcre package summary of files list

well...there are a zillion pcre downloads to try from
an ftp site. and once i install my pcre and pcre-devel
am i suppose to just start picking from the ftp with
an eductated guess and ./configure make make install
and if it is not right get rid of it from package mgr and move on to the next one. now that would be frustrating!

i am thinking this one but what does the 3 at the end of
pcre-7.3 mean? would that be the one and why?
pcre-7.3.tar.bz2

well i am going to try if it will let me to uninstall the
pcre and pcre-devel and then install the archive and see.

thanks for any tips.

jim

mtdew3q 05-10-2008 03:39 PM

drats.

didnt work. i will report this at the haxe community or mail list.

Tinkster 05-10-2008 04:08 PM

What does ls tell you about the installed pcre-libs?
Or even a

Code:

locate libpcre|grep lib/lib


Cheers,
Tink

knudfl 05-10-2008 04:59 PM

'libpcre3' seems to be a special Debian construction.
You can download the source here :
http://packages.debian.org/etch/i386/libpcre3
(pcre3_6.7+7.4-3.diff.gz and pcre3_6.7+7.4.orig.tar.gz)
Unpack the ..tar.gz file and the ..diff.gz file to some folder.
Rename folder pcre-7.4 to pcre3-6.7+7.4 and apply the patch with:
'patch -p0 < pcre3_6.7+7.4-3.diff'
Then you can compile and get 'libpcre.so.3
g++ (c++) is needed.
Good luck !

mtdew3q 05-11-2008 01:35 AM

Quote:

Originally Posted by knudfl (Post 3149435)
'libpcre3' seems to be a special Debian construction.
You can download the source here :
http://packages.debian.org/etch/i386/libpcre3
(pcre3_6.7+7.4-3.diff.gz and pcre3_6.7+7.4.orig.tar.gz)
Unpack the ..tar.gz file and the ..diff.gz file to some folder.
Rename folder pcre-7.4 to pcre3-6.7+7.4 and apply the patch with:
'patch -p0 < pcre3_6.7+7.4-3.diff'
Then you can compile and get 'libpcre.so.3
g++ (c++) is needed.
Good luck !

i followed your instructions which were great.
there is a catch though. still get the same msg.
the new .so file it generated when i followed your
steps was libpcre.so.3.12.0

i get this error:
#:~/abyssws/htdocs> haxelib install flex
Called from EReg.hx line 31
Uncaught exception - load.c(223) : Failed to load library : /usr/lib/neko/regexp.ndll (libpcre.so.3: cannot open shared object file: No such file or directory)

i copied the new generated libpcre.so.3.12.0 to
/usr/lib and /usr/local/lib. i thought that would do it.
hmmmm......wonder why??
but that was really cool. i never saw a patch applied
before like that.

i crossposted at haxe.org mail list with your tips to see if that gave them any ideas.

thanks for helping me out.
jim

Tinkster 05-11-2008 02:12 AM

Usually you'll have a series of symlinks created for
libs, hence my question with the locate above. For
you it might have been as trivial as to
ln -s /usr/lib/libpcre.so.3.12.0 /usr/lib/libpcre.so.3


Not quite sure where knudfl's libpcre3 and debian came from ;}


Cheers,
Tink

knudfl 05-11-2008 02:57 AM

This official Debian package libpcre3 is quite different from others.
From 'README.Debian
Quote:

libpcre for debian
------------------
Upstream's library version is much lower than Debian's - PCRE_LIB_VERSION=0:1:0
instead of 13:0:10 (soname libpcre.so.0 instead of libpcre.so.3)
Links are included in the install result, but may be your application
is not looking in /usr/local/lib

Tinkster 05-11-2008 03:18 AM

Quote:

Originally Posted by knudfl (Post 3149721)
This official Debian package libpcre3 is quite different from others.
From 'README.Debian

Links are included in the install result, but may be your application
is not looking in /usr/local/lib

Quite possible ... it's just that he nowhere mentioned libpcre3
or debian in this thread, and his profile speaks of SuSE.



Cheers,
Tink

knudfl 05-11-2008 03:56 AM

Tinkster :
Seems odd, you are right, but nobody else except the Debian people makes the source
for this library. The "patch" is some 16000 lines.
Rgds
PS: libpcre.so.3 comes from "libpcre3" only, AFAIK.

mtdew3q 05-11-2008 10:35 AM

finding libpcre.so.3 has to be easier way
 
Quote:

Originally Posted by knudfl (Post 3149721)
This official Debian package libpcre3 is quite different from others.
From 'README.Debian

Links are included in the install result, but may be your application
is not looking in /usr/local/lib

hi again-

~> $echo $PATH
bash: /opt/kde3/bin:/home/thirdshift/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/local/lib:/usr/local/lib: No such file or directory

I typed in man ln in terminal. i will read that topic
again in my suse linux book.

yes. i think i remember links included when it created
the actual library file.

and that ln command is cool. thanks for that example.

haxe.org mailing list remains silent for reasons unknown.

well i did what i could and it is really cool you helped
me out with this. i will keep an eye on the haxe list
for a few days and see if anything comes across.

i have a few alternatives if i cant get haxe with flex to work
like use haxe without flex, use the aptana plug-in for AIR, or never mind flex altogether.

i am going to enjoy sunday and put this aside.

it was very cool to receive the help,
3rdshiftcoder

mtdew3q 05-11-2008 11:40 AM

:~> echo $PATH
/opt/kde3/bin:/home/thirdshift/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/local/lib:/usr/local/lib

path looks like this. i made a cut and paste error and didnt catch it.

Tinkster 05-11-2008 01:23 PM

Dynamically linked executables *don't* look for their libs in the
$PATH, but in $LD_LIBRARY_PATH or in /etc/ld.so.cache (which is
populated by ldd with libs from paths that are found in /etc/ld.so.conf).



Cheers,
Tink

mtdew3q 05-11-2008 02:42 PM

Quote:

Originally Posted by Tinkster (Post 3150043)
Dynamically linked executables *don't* look for their libs in the
$PATH, but in $LD_LIBRARY_PATH or in /etc/ld.so.cache (which is
populated by ldd with libs from paths that are found in /etc/ld.so.conf).

Cheers,
Tink

/usr/X11R6/lib/Xaw3d
/usr/X11R6/lib
/usr/lib/Xaw3d
/usr/i386-suse-linux/lib
/usr/local/lib
/opt/kde3/lib
include /etc/ld.so.conf.d/*.conf

thanks. i didnt know that.
this is what is in my /etc/ld.so.conf

the shared library i generated with the patch is
in /usr/local/lib.

i will think it over a few days and decide
what to do. this new book may be on its way
back to amazon soon in the used section :-)
i might not keep it because i dont know what
other things could go wrong and i dont want to
stick around to find out.

thanks Tink-
later

Tinkster 05-11-2008 08:15 PM

When you run an
ldd -v | grep libpcre
.... what output do you get?



Cheers,
Tink

mtdew3q 05-11-2008 08:39 PM

hi Tink and everyone,

very happy to say that i finally got it installed and working.
i reinstalled but this time instead of using an installer
followed a step by step tutorial on compiling with ocaml
and using cvs.

this is what i was able to do (from the tutorial - a quote)

"Our AS3 based Flex application is creating a new instance of our haXe based HaxeApplication class and calling a method on it, which in turn is creating and returning an instance of a Flex AS3 class. We can now communicate bidirectionally between haXe and Flex/AS3."

i am keeping haxe, neko and geany. the problem must be with me as i
am not a linux expert and doing this proves that it does work.

haxe with flex

the only bad thing is i screwed up my editors for kde.
i was able to get an rpm from a repository either on cd or web
and install a new one. kate, and one version of kwrite are screwed up!

thanks!
jim


All times are GMT -5. The time now is 04:32 PM.