[GRASS-dev] GRASS will not not find laslib

Anna Petrášová kratochanna at gmail.com
Thu Oct 8 16:39:08 PDT 2015


On Thu, Oct 8, 2015 at 7:33 PM, Michael Barton <Michael.Barton at asu.edu>
wrote:

> I could try that. I originally build liblas with dual architecture. But
> current OS X and boost choke on dual architecture. So I built it 64 bit. I
> assumed that that means I needed to build laslib also only 64 bit. If you
> think I can get away with dual architecture there, I can give it a try.
>

I don't know if it helps, I just assumed this could be the problem since it
complaint about  " file was built for archive which is not the architecture
being linked (i386)". In the GRASS configure, you specify i386 and x86_64,
but it can't find the i386 liblas. You can try changing GRASS configure to
use only x86_64. But I have very vague understanding of how these things
work, so I hope someone else could help.


> Michael
> ____________________
> C. Michael Barton
> Director, Center for Social Dynamics & Complexity
> Professor of Anthropology, School of Human Evolution & Social Change
> Head, Graduate Faculty in Complex Adaptive Systems Science
> Arizona State University
>
> voice:  480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
> fax: 480-965-7671 (SHESC),  480-727-0709 (CSDC)
> www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> On Oct 8, 2015, at 4:07 PM, Anna Petrášová <kratochanna at gmail.com> wrote:
>
>
>
> On Thu, Oct 8, 2015 at 6:26 PM, Michael Barton <Michael.Barton at asu.edu>
> wrote:
>
>> I built boost with both bjam and b2 for i86_64. Here are the setups I
>> used:
>>
>> cd /Users/Shared/grass_dev/boost_1_59_0
>> edit
>> /Users/cmbarton/grass_source/LAS/boost_1_59_0/tools/build/src/tools/darwin.jam
>> to delete -gdwarf-2 ]
>>
>> export CXXFLAGS=-stdlib=libstdc++
>> ./bootstrap.sh --prefix=/Users/cmbarton/grass_source/LAS/boostlib
>> --without-libraries=python
>>
>> ## attempt 1
>> ./bjam variant=release link=static --without-mpi -j4 macosx-version=10.7
>> macosx-version-min=10.7 architecture=x86 address-model=64 install
>>
>> ## attempt 2
>> ./b2 variant=release link=static --without-mpi -j4 macosx-version=10.7
>> macosx-version-min=10.7 cxxflags="-arch x86_64"
>>
>> I built liblas for i86_64. I initially set the prefix to put all the
>> liblas files into a local directory where I could get them for packaging.
>> Then I did it again letting them go into /usr/local. In all cases I get
>> this same error. This is with installing it into a nice local folder.
>>
>> xport BOOST_ROOT="/Users/cmbarton/grass_source/LAS/boostlib"
>> export
>> BOOST_INCLUDEDIR="/Users/cmbarton/grass_source/LAS/boostlib/include"
>>
>> cmake -G "Unix Makefiles" \
>> -D CMAKE_INSTALL_PREFIX="/Users/cmbarton/grass_source/LAS/liblasdist" \
>> -D CMAKE_OSX_ARCHITECTURES="x86_64"  \
>> -D CMAKE_OSX_SYSROOT="/Developer/SDKs/MacOSX10.7.sdk" \
>> -D GDAL_CONFIG="/Library/Frameworks/GDAL.framework/Programs/gdal-config" \
>> -D GDAL_INCLUDE_DIR="/Library/Frameworks/GDAL.framework/Headers" \
>> -D
>> GDAL_LIBRARY="/Library/Frameworks/GDAL.framework/unix/lib/libgdal.dylib" \
>> -D
>> GEOTIFF_INCLUDE_DIR="/Library/Frameworks/UnixImageIO.framework/unix/include"
>>  \
>> -D
>> GEOTIFF_LIBRARY="/Library/Frameworks/UnixImageIO.framework/unix/lib/libgeotiff.dylib"
>>  \
>> -D TIFF_INCLUDE_DIR="/Library/Frameworks/UnixImageIO.framework/Headers" \
>> -D
>> TIFF_LIBRARY="/Library/Frameworks/UnixImageIO.framework/unix/lib/libtiff.dylib"
>> \
>> -D CMAKE_VERBOSE_MAKEFILE=true ../
>>
>>
>> Here is the GRASS configure error:
>>
>> 1 warning generated.
>> configure:6164: checking whether to use libLAS
>> configure:6181: checking for liblas-config
>> configure:6238: gcc -o conftest -g -O2   -arch i386 -arch x86_64
>> -isysroot /Developer/SDKs/MacOSX10.7.sdk    -I/usr/local/include
>> -I/usr/local/include -I/Library/Frameworks/GDAL.framework/Headers
>> -I/Library/Frameworks/UnixImageIO.framework/unix/include
>> -I/Library/Frameworks/UnixImageIO.framework/Headers   -arch i386 -arch
>> x86_64 -isysroot /Developer/SDKs/MacOSX10.7.sdk   -L/usr/local/lib
>> conftest.c  -L/usr/local/lib -llas -llas_c
>> -L/Users/cmbarton/grass_source/LAS/boostlib/lib
>> /Users/cmbarton/grass_source/LAS/boostlib/lib/libboost_program_options.a
>> /Users/cmbarton/grass_source/LAS/boostlib/lib/libboost_thread.a
>> /Library/Frameworks/GDAL.framework/unix/lib/libgdal.dylib
>> /Library/Frameworks/UnixImageIO.framework/unix/lib/libgeotiff.dylib
>> /Library/Frameworks/UnixImageIO.framework/unix/lib/libtiff.dylib 1>&5
>> ld: warning: ld: warning: ld: warning: ignoring file
>> /usr/local/lib/liblas.dylib, file was built for x86_64 which is not the
>> architecture being linked (i386): /usr/local/lib/liblas.dylibignoring file
>> /usr/local/lib/liblas_c.dylib, file was built for x86_64 which is not the
>> architecture being linked (i386): /usr/local/lib/liblas_c.dylibignoring
>> file
>> /Users/cmbarton/grass_source/LAS/boostlib/lib/libboost_program_options.a,
>> file was built for archive which is not the architecture being linked
>> (i386):
>> /Users/cmbarton/grass_source/LAS/boostlib/lib/libboost_program_options.a
>>
>>
>> ld: warning: ignoring file
>> /Users/cmbarton/grass_source/LAS/boostlib/lib/libboost_thread.a, file was
>> built for archive which is not the architecture being linked (i386):
>> /Users/cmbarton/grass_source/LAS/boostlib/lib/libboost_thread.a
>> Undefined symbols for architecture i386:
>>   "_LASReader_Create", referenced from:
>>       _main in conftest-68543b.o
>> ld: symbol(s) not found for architecture i386
>> clang: error: linker command failed with exit code 1 (use -v to see
>> invocation)
>> configure: failed program was:
>> #line 6231 "configure"
>> #include "confdefs.h"
>> #include <liblas/capi/liblas.h>
>> int main() {
>> LASReader_Create("foo");
>> ; return 0; }
>>
>>
>> Anna, I'm happy to pass on tricks once I get them to actually work. I'm
>> keeping notes.
>>
>
> Thanks! I wonder if the problem can't be the line in the liblas config:
>
> -D CMAKE_OSX_ARCHITECTURES="x86_64"  \
>
> how about this? (just a guess)
>
> -D CMAKE_OSX_ARCHITECTURES="x86_64;i386"
>
>
>
>
>> Michael
>>
>> ____________________
>> C. Michael Barton
>> Director, Center for Social Dynamics & Complexity
>> Professor of Anthropology, School of Human Evolution & Social Change
>> Head, Graduate Faculty in Complex Adaptive Systems Science
>> Arizona State University
>>
>> voice:  480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
>> fax: 480-965-7671 (SHESC),  480-727-0709 (CSDC)
>> www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Oct 8, 2015, at 3:07 PM, Anna Petrášová <kratochanna at gmail.com> wrote:
>>
>>
>>
>> On Thu, Oct 8, 2015 at 5:24 PM, Michael Barton <Michael.Barton at asu.edu>
>> wrote:
>>
>>> With a lot of effort and some help, I've rebuilt liblas with new GDAL.
>>> Now GRASS will not find liblas with the same configuration script that I've
>>> used before. Here it is:
>>>
>>
>> Was there some specific trick that you could share?
>>
>>>
>>> ./configure --with-macosx-sdk=/Developer/SDKs/MacOSX10.7.sdk
>>> --with-freetype
>>> --with-freetype-includes="/Library/Frameworks/FreeType.framework/unix/include/freetype2 /Library/Frameworks/FreeType.framework/unix/include"
>>> --with-freetype-libs=/Library/Frameworks/FreeType.framework/unix/lib
>>> --with-gdal=/Library/Frameworks/GDAL.framework/Programs/gdal-config
>>> --with-proj
>>> --with-proj-includes=/Library/Frameworks/PROJ.framework/unix/include
>>> --with-proj-libs=/Library/Frameworks/PROJ.framework/unix/lib
>>> --with-proj-share=/Library/Frameworks/PROJ.framework/Resources/proj
>>> --with-geos=/Library/Frameworks/GEOS.framework/Versions/3/unix/bin/geos-config
>>> --with-jpeg-includes=/Library/Frameworks/UnixImageIO.framework/unix/include
>>> --with-jpeg-libs=/Library/Frameworks/UnixImageIO.framework/unix/lib
>>> --with-png-includes=/Library/Frameworks/UnixImageIO.framework/unix/include
>>> --with-png-libs=/Library/Frameworks/UnixImageIO.framework/unix/lib
>>> --with-tiff-includes=/Library/Frameworks/UnixImageIO.framework/unix/include
>>> --with-tiff-libs=/Library/Frameworks/UnixImageIO.framework/unix/lib
>>> --with-cairo
>>> --with-cairo-includes="/Library/Frameworks/cairo.framework/unix/include/cairo /Library/Frameworks/cairo.framework/unix/include"
>>> --with-cairo-libs=/Library/Frameworks/cairo.framework/unix/lib
>>> --with-cairo-ldflags="-lcairo" --without-postgres --without-mysql
>>> --with-sqlite
>>> --with-sqlite-libs=/Library/Frameworks/SQLite3.framework/unix/lib
>>> --with-sqlite-includes=/Library/Frameworks/SQLite3.framework/unix/include
>>> --with-fftw-includes=/Library/Frameworks/FFTW3.framework/unix/include
>>> --with-fftw-libs=/Library/Frameworks/FFTW3.framework/unix/lib --with-x
>>> --with-cxx --with-opengl=aqua --without-readline --prefix=/Applications
>>> --enable-macosx-app --with-python
>>> --with-wxwidgets=/usr/local/lib/wxPython-unicode-2.8.12.1/bin/wx-config
>>> --with-tcltk-includes="/Library/Frameworks/Tcl.framework/Headers
>>> /Library/Frameworks/Tk.framework/Headers
>>> /Library/Frameworks/Tk.framework/PrivateHeaders"
>>> --with-tcltk-libs="/usr/local/tcltk_active/lib" --with-macosx-archs="i386
>>> x86_64" --with-liblas="/usr/local/bin/liblas-config" --with-opencl
>>> --with-nls --with-libs=/usr/local/lib  --with-includes=/usr/local/include
>>>
>>> FWIW, here is the uninformative error. Any thoughts???
>>>
>>
>> There should be a log file from the configuration with more details, not
>> sure what's its name though.
>>
>>
>>>
>>> checking for liblas-config... /usr/local/bin/liblas-config
>>> configure: error: *** Unable to locate libLAS library.
>>>
>>> (yes liblas-config is exactly where I say it is)
>>>
>>> Michael
>>> ____________________
>>> C. Michael Barton
>>> Director, Center for Social Dynamics & Complexity
>>> Professor of Anthropology, School of Human Evolution & Social Change
>>> Head, Graduate Faculty in Complex Adaptive Systems Science
>>> Arizona State University
>>>
>>> voice:  480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
>>> fax: 480-965-7671 (SHESC),  480-727-0709 (CSDC)
>>> www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20151008/8987ce67/attachment-0001.html>


More information about the grass-dev mailing list