[OpenIndiana-discuss] gcc -l
Alexander Pyhalov
alp at rsu.ru
Tue Aug 29 08:56:05 UTC 2017
On 08/29/17 11:43 AM, Handojo via openindiana-discuss wrote:
> Dear Friends,
> I am currently stuck with a subset of an installation Script on PostGIS on OI, which prevents me to go further, and project time is due.
>
> - Here's the problematic gcc
> ========================gcc -m64 -I../liblwgeom -fPIC -shared -o postgis-2.3.so postgis_module.o lwgeom_accum.o lwgeom_spheroid.o lwgeom_ogc.o lwgeom_functions_analytic.o lwgeom_inout.o lwgeom_functions_basic.o lwgeom_btree.o lwgeom_box.o lwgeom_box3d.o lwgeom_geos.o lwgeom_sfcgal.o lwgeom_backend_api.o lwgeom_geos_prepared.o lwgeom_geos_clean.o lwgeom_geos_relatematch.o lwgeom_export.o lwgeom_in_gml.o lwgeom_in_kml.o lwgeom_in_geohash.o lwgeom_in_geojson.o lwgeom_in_encoded_polyline.o lwgeom_triggers.o lwgeom_dump.o lwgeom_dumppointso lwgeom_functions_lrs.o lwgeom_functions_temporal.o long_xact.o lwgeom_sqlmm.o lwgeom_rtree.o lwgeom_transform.o lwgeom_window.o gserialized_typmod.o gserialized_gist_2d.o gserialized_gist_nd.o brin_2d.o brin_nd.o brin_common.o gserialized_estimate.o geography_inout.o geography_btree.o geography_measurement.o geography_measurement_trees.o geometry_inout.o -L/opt/postgres/9.6.3-pgdg/lib/64 -L/usr/lib -L/usr/lib -Wl, -R'/opt/postgres/9.6.3-pgdg/lib/64' ..
> /libpgcommon/libpgcommon.a ../liblwgeom/.libs/liblwgeom.a -L/opt/postgres/geos/lib -L/opt/postgres/proj4/lib -lgeos_c -proj -ljson-c -L/usr/lib -R/usr/lib -lxml2 -L/usr/lib -lz -llzma -lpthread -lm -lsocket -lnsl -L/usr/local/lib -lSFCGAL -L/usr/local/bin/lib -L/usr/local/lib -lSFCGAL
>
> ========================
> It seems that "-l" assumes that it can "find" the specified library on the system. Example -lSFCGALAnd it seems that it tries to locate that particular library in the "installed by IPS" repository.
> However, I am installing from the source and hence, gcc can't find it.
Hello.
ld looks for libraries either in $LD_LIBRARY_PATH, in configured by crle
library search path (look at crle(1) man page) or where you specified
them with -L. For runtime linker to find library, it should be in
$LD_LIBRARY_PATH, in configured by crle library search path or in binary
RUNPATH (which can be set by -R ld option).
So, briefly, likely you have to add -L/path/to/library
-R/path/to/library -llib to LD options while compiling binaries.
Where is libSFCGALAnd.so situated?
--
С уважением,
Александр Пыхалов,
программист отдела телекоммуникационной инфраструктуры
управления информационно-коммуникационной инфраструктуры ЮФУ
More information about the openindiana-discuss
mailing list