Re: Building lablGtk 2.18.0/2.14.2 + gtksourceview2 on Windows

Enrico Tassi <[email protected]> Thu, 5 Dec 2013 12:06:09 +0100
Newsgroups gmane.comp.lang.ocaml.lib.gtk
Message-ID <[email protected]>
--vtzGhvizbBRQ85DL
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Thu, Dec 05, 2013 at 10:13:20AM +0900, Jacques Garrigue wrote:
> >  Cannot load required shared library dlllablgtksourceview2
> >  Reason: ./dlllablgtksourceview2.dll: Access is denied.
> 
> This could be a missing dependency.
> They are a major pain on windows, as by default you get no information at all.
> Did you check with depends.exe?

Thanks for the hint.  depends.exe revelas some problems, but the yare
the same for dlllablgtk2.dll and dlllablgtksourceview2.dll (missing
IESHIMS, plus some warnings:

  Warning: At least one delay-load dependency module was not found.
  Warning: At least one module has an unresolved import due to a missing
  export function in a delay-load dependent module.

referring to SHLWAPI and IEFRAME.  Making it find IESHIMS does not help.
Given that both lablgtk have the same warnings, I may be out of luck.

If I use flexdll to see the symbols exported by dlllablgtk2.dll
(-show-exports), they cover the ones missing (-maindll) in
dlllablgtksourceview2.dll (but for the ones in the _caml namespace).

I'm attaching the script I use to build a fresh SDK.  If someone has
a windows with a minimal cygwin installation (bash, wget, tar, zip,
make), then the script should be able to reproduce the error (you have
to click "yes", the ocaml-istaller is not completely supporting a batch
mode, and I'm using it).

BTW, it there a reason for gtksourceview2 not being part of the win32
binaries available on the lablgtk2 homepage?

Ciao
-- 
Enrico Tassi

--vtzGhvizbBRQ85DL
Content-Type: application/x-sh
Content-Disposition: attachment; filename="build-sdk.sh"
Content-Transfer-Encoding: quoted-printable

#!/bin/sh=0A=0Aset -e=0A#set -x=0A=0A# Resources to be downloaded=0Aocaml=
=3Docaml-4.00.1-i686-mingw64-installer3.exe =0Aocaml_URL=3D'http://yquem.in=
ria.fr/~protzenk/caml-installer/'$ocaml=0A=0Alablgtk=3Dlablgtk-2.18.0.tar.g=
z =0Alablgtk_URL=3D'https://forge.ocamlcore.org/frs/download.php/1261/'$lab=
lgtk=0A=0Agtk=3D'gtk+-bundle_2.24.10-20120208_win32.zip'=0Agtk_URL=3D'ftp:/=
/ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.24/'$gtk=0A=0Axmldev=3D'libx=
ml2-dev_2.9.0-1_win32.zip'=0Axmldev_URL=3D'ftp://ftp.gnome.org/pub/gnome/bi=
naries/win32/dependencies/'$xmldev=0Axml=3D'libxml2_2.9.0-1_win32.zip'=0Axm=
l_URL=3D'ftp://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/'$xml=0A=
sourceview=3D'gtksourceview-2.10.0.zip'=0Asourceview_URL=3D'ftp://ftp.gnome=
=2Eorg/pub/gnome/binaries/win32/gtksourceview/2.10/'$sourceview=0Asourcevie=
wdev=3D'gtksourceview-dev-2.10.0.zip'=0Asourceviewdev_URL=3D'ftp://ftp.gnom=
e.org/pub/gnome/binaries/win32/gtksourceview/2.10/'$sourceviewdev=0A=0A# ut=
ilities=0A# http://www.dependencywalker.com/depends22_x86.zip=0A=0A# The SD=
K itself=0AREVISION=3D0=0ABASE=3D/cygdrive/c/CoqSDK-$REVISION=0ABASE_TMP=3D=
/cygdrive/c/CoqSDK-TMP=0A=0Asetup_base() {=0A  rm -rf $BASE 2> /dev/null=0A=
  mkdir -p $BASE=0A  mkdir -p $BASE/lib/stublibs/=0A  mkdir -p $BASE/lib/si=
te-lib/=0A  echo "export PATH=3D\"$BASE/bin:\$PATH\""  >$BASE/environ=0A  e=
cho "export OCAMLLIB=3D\"`cygpath -m $BASE`/lib\""  >>$BASE/environ=0A  ech=
o "export OCAMLFIND_CONF=3D\"`cygpath -m $BASE`/etc/findlib.conf\""  >>$BAS=
E/environ=0A  if [ ! -e $ocaml ]; then wget $ocaml_URL; fi=0A  if [ ! -e $l=
ablgtk ]; then wget --no-check-certificate $lablgtk_URL; fi=0A  if [ ! -e $=
gtk ]; then wget $gtk_URL; fi=0A  if [ ! -e $xml ]; then wget $xml_URL; fi=
=0A  if [ ! -e $xmldev ]; then wget $xmldev_URL; fi=0A  if [ ! -e $sourcevi=
ew ]; then wget $sourceview_URL; fi=0A  if [ ! -e $sourceviewdev ]; then wg=
et $sourceviewdev_URL; fi=0A}=0A=0Ainstall_gtk() {=0A  for z in $gtk $xml $=
xmldev $sourceview $sourceviewdev; do=0A  	echo "Installing $z"=0A  	unzip =
-q $z -d $BASE=0A  done=0A}=0A =0Ainstall_ocaml() {=0A  echo "Installing $o=
caml"=0A  cygstart -w $ocaml /S /D=3D`cygpath -w $BASE_TMP`=0A  cp -r $BASE=
_TMP/bin $BASE/=0A  cp -r $BASE_TMP/lib $BASE/=0A  cp -r $BASE_TMP/etc $BAS=
E/=0A  sed -i "s/TMP/$REVISION/" $BASE/etc/findlib.conf=0A  sed -i "s/TMP/$=
REVISION/" $BASE/lib/ld.conf =0A  cygstart -w $BASE_TMP/uninstall.exe /S=0A=
  rm -rf $BASE_TMP=0A}=0A=0Abuild_install_lablgtk() {=0A  echo "Building $l=
ablgtk"=0A  . $BASE/environ=0A  rm -rf build=0A  mkdir build=0A  tar -xzf $=
lablgtk -C build=0A  cd build/lablgtk-*=0A  ./configure --disable-gtktest -=
-prefix=3D"`cygpath -m $BASE`"=0A  sed -i 's?\\?/?g' config.make=0A  make=
=0A  make opt=0A  cd src=0A  ./lablgtk2 ../examples/calc.ml=0A  ./lablgtk2 =
-all ../examples/calc.ml=0A  cd ..=0A  echo "Installing $lablgtk"=0A  make =
install=0A  chmod a+x $BASE/lib/stublibs/*.ddl=0A  cd ../..=0A}=0A=0Aif [ -=
z "$1" ]; then =0A  setup_base=0A  install_ocaml=0A  install_gtk=0A  build_=
install_lablgtk=0Aelse=0A  $1=0Afi=0A
--vtzGhvizbBRQ85DL
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Lablgtk-list mailing list
[email protected]
https://lists.ocamlcore.org/cgi-bin/listinfo/lablgtk-list

--vtzGhvizbBRQ85DL--