On 17 September 2013 22:55, andy <[email protected]> wrote:
I start with:

cmake -DCMAKE_INSTALL_PREFIX=/tmp/map  -DWITH_PERL=1  ..

it runs ok, and displays:

-- Will install files to /tmp/map
-- Configuring done
-- Generating done

then I run make, which compiles fine.  But "make install" has a problem
with mapscript and tries to copy it to /usr/local/lib64, not /tmp/map.

-- Installing: /usr/local/lib64/perl5/auto/mapscript/mapscript.so
CMake Error at mapscript/perl/cmake_install.cmake:38 (FILE):
    file INSTALL cannot copy file


In mapscript/perl/CMakeLists.txt, how about stripping the leading '/' so
that INSTALL() has a relative path instead of absolute:

set(CUSTOM_PERL_SITE_ARCH_DIR ${PERL_SITEARCH} CACHE DIR "Custom
installation directory for perl binary extension
# strip leading slash so INSTALL() uses CMAKE_INSTALL_PREFIX
string(SUBSTRING ${CUSTOM_PERL_SITE_ARCH_DIR} 1 -1
CUSTOM_PERL_SITE_ARCH_DIR)


Maybe?

-Andy


On 09/24/2013 04:51 AM, thomas bonfort wrote:> Disclaimer: I might have no idea 
of what I'm talking about given I'm
no mapscript or perl user or expert.
I'm a bit weary of applying this one. We'll install to the directory
required by the current perl installation, which is independent of the
prefix path. I believe you can supply CUSTOM_PERL_SITEARCH_DIR on the
command line if you want to install somewhere else, correct?

--
thomas


I finally got back to this little project, and turns out the answer is not to 
use CMAKE_INSTALL_PREFIX.

Instead, use:
cmake .. -DWITH_PERL=1

Then use DESTDIR (just like you used to in prior version):
make install DESTDIR=/tmp/map

Everything installs to the tmp folder, and I can create a package from there.

Also, I can report, that my test box upgraded and ran ok with 6.4.1 (although I 
have not tested extensively).

-Andy

_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to