* How to build a shared library on DEC alpha 3.2
@ 1998-08-06 4:00 boucheau
1998-08-06 4:00 ` Joe Mario
0 siblings, 1 reply; 5+ messages in thread
From: boucheau @ 1998-08-06 4:00 UTC (permalink / raw)
Hi,
I try to build a shared library on DEC alpha V3.2 using the following
commands:
/bin/cc -c -g GccOptimizedFlags -fpic -Dlint -DPOSIX_SOURCE -DOSF
-Dalpha -DSYSV -DRE_DECLARE_SIGNALS -Dbsd -taso -migrate -assume
noaligned_object -I. -I/vb/source -I/vb/source/include -I/DEC/include
-I/usr/local/include
-I/usr/include/X11 -IIsm_Extra_Osi_Inc_Dir /vb/source/vb_version.c
touch .vb_version~
/bin/cc -shared -Dbsd -taso -migrate -assume noaligned_object -threads \
vb_version.o -L/vb/DEC/lib -L/vb/DEC/shared_lib -warning_unresolved
-lm \
-o libvb_version.so
When I execute a binary C doing a dlopen of this shared library, I got
the error message
dlopen: Cannot map library :/vb/DEC/shared_lib/libvb_version.so
If I override my libvb_version.so by a system shared library (for
example /usr/shlib/libots.so)
the dlopen is well performed.
my shared lib and the system shared lib has not the same format:
$ file libvb_version.so
libvb_version.so: COFF format alpha dynamically linked, demand
paged executable or object module not stripped - version 3.11-8
$ file libots.so
libots.so_s1: COFF format alpha shared library, demand paged
executable or object module not stripped - version 3.11-8
So my problem comes from a bad construction of my shared lib, but how
build a shared library ?
Thanks in advance.
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: How to build a shared library on DEC alpha 3.2
1998-08-06 4:00 How to build a shared library on DEC alpha 3.2 boucheau
@ 1998-08-06 4:00 ` Joe Mario
1998-08-06 4:00 ` Tim Mooney
1998-08-06 4:00 ` boucheau
0 siblings, 2 replies; 5+ messages in thread
From: Joe Mario @ 1998-08-06 4:00 UTC (permalink / raw)
To: boucheau
Prior to V4.0, you cannot use the cc driver to build shared libraries.
You must call ld directly. For example:
ld -shared -no_archive -o my_lib.so a.o b.o c.o -lc
As of V4.0, it's preferrable to use the cc driver to build shared libs.
Joe Mario
boucheau wrote:
>
> Hi,
> I try to build a shared library on DEC alpha V3.2 using the following
> commands:
>
> /bin/cc -c -g GccOptimizedFlags -fpic -Dlint -DPOSIX_SOURCE -DOSF
> -Dalpha -DSYSV -DRE_DECLARE_SIGNALS -Dbsd -taso -migrate -assume
> noaligned_object -I. -I/vb/source -I/vb/source/include -I/DEC/include
> -I/usr/local/include
> -I/usr/include/X11 -IIsm_Extra_Osi_Inc_Dir /vb/source/vb_version.c
> touch .vb_version~
> /bin/cc -shared -Dbsd -taso -migrate -assume noaligned_object -threads > ...
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to build a shared library on DEC alpha 3.2
1998-08-06 4:00 ` Joe Mario
@ 1998-08-06 4:00 ` Tim Mooney
1998-08-07 4:00 ` Joe Mario
1998-08-06 4:00 ` boucheau
1 sibling, 1 reply; 5+ messages in thread
From: Tim Mooney @ 1998-08-06 4:00 UTC (permalink / raw)
In article <35C9DBD5.4287@zk3.dec.com>, Joe Mario <mario@zk3.dec.com> wrote:
> As of V4.0, it's preferrable to use the cc driver to build shared libs.
Why?
Tim
--
Tim Mooney mooney@dogbert.cc.ndsu.NoDak.edu
Information Technology Services (701) 231-1076 (Voice)
Room 242-J1, IACC Building (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to build a shared library on DEC alpha 3.2
1998-08-06 4:00 ` Tim Mooney
@ 1998-08-07 4:00 ` Joe Mario
0 siblings, 0 replies; 5+ messages in thread
From: Joe Mario @ 1998-08-07 4:00 UTC (permalink / raw)
To: Tim Mooney
Tim Mooney wrote:
>> Joe Mario <mario@zk3.dec.com> wrote:
>>
>> As of V4.0, it's preferrable to use the cc driver to build shared
>> libs.
>
> Why?
I guess I take that back. If you know how to build shared libraries
by calling ld directly, then either way is fine. Using the cc driver
does tend to reduce mistakes/problems that get reported back.
Joe
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to build a shared library on DEC alpha 3.2
1998-08-06 4:00 ` Joe Mario
1998-08-06 4:00 ` Tim Mooney
@ 1998-08-06 4:00 ` boucheau
1 sibling, 0 replies; 5+ messages in thread
From: boucheau @ 1998-08-06 4:00 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 928 bytes --]
Joe Mario wrote:
> Prior to V4.0, you cannot use the cc driver to build shared libraries.
> You must call ld directly. For example:
>
> ld -shared -no_archive -o my_lib.so a.o b.o c.o -lc
>
> As of V4.0, it's preferrable to use the cc driver to build shared libs.
>
> Joe Mario
>
> boucheau wrote:
> >
> > Hi,
> > I try to build a shared library on DEC alpha V3.2 using the following
> > commands:
> >
> > /bin/cc -c -g GccOptimizedFlags -fpic -Dlint -DPOSIX_SOURCE -DOSF
> > -Dalpha -DSYSV -DRE_DECLARE_SIGNALS -Dbsd -taso -migrate -assume
> > noaligned_object -I. -I/vb/source -I/vb/source/include -I/DEC/include
> > -I/usr/local/include
> > -I/usr/include/X11 -IIsm_Extra_Osi_Inc_Dir /vb/source/vb_version.c
> > touch .vb_version~
> > /bin/cc -shared -Dbsd -taso -migrate -assume noaligned_object -threads > ...
Thank you very much. It works fine and I am very happy.
Best regards.
Vincent.Boucheau@Bull.net
[-- Attachment #2: Type: text/html, Size: 1076 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~1998-08-07 4:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-08-06 4:00 How to build a shared library on DEC alpha 3.2 boucheau
1998-08-06 4:00 ` Joe Mario
1998-08-06 4:00 ` Tim Mooney
1998-08-07 4:00 ` Joe Mario
1998-08-06 4:00 ` boucheau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox