[packaging] libmariadb: Fix incorrect filename in mysql/buildfile

Feiyun Wang feiyunw at yahoo.com
Mon Jun 11 01:38:44 UTC 2018


Hi Karen,



I failed to build libmariadb with VS2017:
````
D:\Program Files (x86)\Microsoft Visual Studio\2017\Community>set PATH=C:\build2
\bin;%PATH%

D:\Program Files (x86)\Microsoft Visual Studio\2017\Community>cd /d g:\prj\odb

g:\prj\odb>mkdir libmariadb-vs2017

g:\prj\odb>b config.cxx=cl config.cc.coptions="/O2 /wd4819" config.install.root=
"install/libmariadb-vs2017/" "configure(libmariadb/@libmariadb-vs2017/)"
mkdir -p libmariadb-vs2017\build\
save libmariadb-vs2017\build\config.build
mkdir -p libmariadb-vs2017\tests\build\
save libmariadb-vs2017\tests\build\config.build

g:\prj\odb>cd libmariadb-vs2017

g:\prj\odb\libmariadb-vs2017>b install
mkdir fsdir{mysql\}
mkdir mysql\fsdir{libmariadb\}
mkdir mysql\fsdir{zlib\}
mkdir mysql\fsdir{plugins\}
mkdir mysql\plugins\fsdir{auth\}
mkdir mysql\plugins\fsdir{pvio\}
ver ..\libmariadb\mysql\version.h.in
mkdir mysql\libmariadb\fsdir{secure\}
mkdir mysql\fsdir{win-iconv\}
ver ..\libmariadb\mysql\libmariadb\ma_client_plugin.c.in
c ..\libmariadb\mysql\libmariadb\c{ma_sha1}@mysql\libmariadb\
...
c ..\libmariadb\mysql\zlib\c{infback}@mysql\zlib\
ld mysql\libs{mariadb}
LINK : fatal error LNK1104: 无法打开文件“G:\prj\odb\libmariadb-vs2017\mysql\lib
mariadb\mariadbclient.def”
ld mysql\liba{mariadb}
info: failed to update (for install) dir{.\}

g:\prj\odb\libmariadb-vs2017>b install
install ..\install\libmariadb-vs2017\
install ..\install\libmariadb-vs2017\include\
install ..\install\libmariadb-vs2017\include\mysql\
install ..\libmariadb\mysql\h{errmsg}@mysql\
install ..\libmariadb\mysql\h{mariadb_com}@mysql\
install ..\libmariadb\mysql\h{mariadb_ctype}@mysql\
install ..\libmariadb\mysql\h{mariadb_stmt}@mysql\
install ..\libmariadb\mysql\h{mariadb_version}@mysql\
install ..\libmariadb\mysql\h{ma_list}@mysql\
install ..\libmariadb\mysql\h{mysql}@mysql\
install ..\libmariadb\mysql\h{mysqld_error}@mysql\
install ..\install\libmariadb-vs2017\share\
install ..\install\libmariadb-vs2017\share\doc\
install ..\install\libmariadb-vs2017\share\doc\libmariadb\
install ..\libmariadb\manifest{manifest}
install mysql\h{version}
install mysql\liba{mariadb}
install: cannot stat 'mysql\mariadb.dll.lib': No such file or directory
install ..\libmariadb\doc{COPYING}
install ..\libmariadb\doc{README}
info: failed to install dir{.\}

g:\prj\odb\libmariadb-vs2017>b --version
build2 0.8.0-a.0.df58e30c521e
libbutl 0.8.0-a.0.22dcb13424c3
host x86_64-microsoft-win32-msvc14.1
Copyright (c) 2014-2018 Code Synthesis Ltd
This is free software released under the MIT license.

g:\prj\odb\libmariadb-vs2017>
````




The libmariadb test version is:
Revision: 154e0454ad9fc9ec7614db19cb9f2bc592d9edff
Author: Karen Arutyunov <karen at codesynthesis.com>
Date: 2018/6/2 1:34:06
Message:
Remove target/scope irregularity workarounds




Sincerely,
Feiyun Wang


    On ‎Wednesday‎, ‎June‎ ‎06‎, ‎2018‎ ‎06‎:‎03‎:‎02‎ ‎PM, Karen Arutyunov <karen at codesynthesis.com> wrote:  
 
 Hi,

> Fix incorrect filename in libmariadb/mysql/buildfile like:
>   if ($tclass == 'windows')
>   {
> -  libmariadb/def{mariadbclient}: libmariadb/in{mariadbclient_win32} \
> +  libmariadb/def{mariadbclient}: libmariadb/in{mariadbclient_win32.def} \

No that wouldn't work. It would search for prerequisite 
mariadbclient_win32.def, rather than for mariadbclient_win32.def.in, and 
fail like this:

error: no rule to update mysql\libmariadb\in{mariadbclient_win32.def}
  info: re-run with --verbose 4 for more information
  info: while applying rule version.in to update 
mysql\libmariadb\def{mariadbclient}
  info: while applying rule c.link to update mysql\liba{mariadb}
  info: while applying rule bin.lib to update mysql\lib{mariadb}
  info: while applying rule alias to update dir{mysql\}
  info: while applying rule alias to update dir{.\}
info: failed to update dir{.\}

For 'in' type the prerequisite extension defaults to the one taken from 
the target, adding '.in' (see comment for the 'in' class in 
https://git.build2.org/cgit/build2/tree/build2/target.hxx for details).

Does the existing libmariadb project (re-)build fails for you under some 
circumstances?

Best regards,
Karen
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.build2.org/archives/packaging/attachments/20180611/a0b108aa/attachment.html>


More information about the packaging mailing list