when do cross compile:
./configure --prefix=$HOME/develop/crosstool-ng/x-tools/libcgi --build=i686-pc-cygwin --target=arm-xscale-linux-gnueabi --host=arm-xscale-linux-gnueabi
make CC=arm-xscale-linux-gnueabi-gcc
then do:
make install
but when, my here, not create the lib and include folder under prefix folder:
$HOME/develop/crosstool-ng/x-tools/libcgi
then:
make install will just copy files into file (lib and include), not those folder:
CLi@PC-CLI-1 ~/develop/libcgi/libcgi-1.0
$ make install
cp src/libcgi.a /home/CLi/develop/crosstool-ng/x-tools/libcgi/lib
cp src/libcgi.so /home/CLi/develop/crosstool-ng/x-tools/libcgi/lib
cp src/cgi.h /home/CLi/develop/crosstool-ng/x-tools/libcgi/include
cp src/session.h /home/CLi/develop/crosstool-ng/x-tools/libcgi/include
CLi@PC-CLI-1 ~/develop/libcgi/libcgi-1.0
$ ll /home/CLi/develop/crosstool-ng/x-tools/libcgi
total 48K
-rwxr-xr-x 1 CLi Domänen-Benutzer 1.1K Aug 6 12:59 include*
-rw-r--r-- 1 CLi Domänen-Benutzer 44K Aug 6 12:59 lib
so, solution:
change Makefile, from:
install:
cp src/libcgi.a $(LIBDIR)
cp src/libcgi.so $(LIBDIR)
cp src/cgi.h $(INCDIR)
cp src/session.h $(INCDIR)
to:
install:
mkdir -p $(LIBDIR)
cp src/libcgi.a $(LIBDIR)
cp src/libcgi.so $(LIBDIR)
mkdir -p $(INCDIR)
cp src/cgi.h $(INCDIR)
cp src/session.h $(INCDIR)
can fix this bug.
but I do not know how to edit the configue to finally fix this bug.
so need author to do something to fix this bug.
libcgi switched to CMake with v1.1 (see https://github.com/rafaelsteil/libcgi/releases for recent version), cross-compiling works different than with autotools, but it works. If you need fixed cross compilation for v1.0, see libcgi package in older releases of buildroot or ptxdist, which both had patches for that.