[build2] build2 g++ -std=c++1y problem

Feiyun Wang feiyunw at yahoo.com
Wed May 23 15:31:52 UTC 2018


 Hi,
It's still incomplete.I figured out that if I add the above version.(h|hxx) files in advance, build-msvc.bat can do more.I guess I have to do the corrections in C:\build2-build\build2-toolchain-0.7-a.0\ again!
Sincerely,Feiyun Wang

    On ‎Wednesday‎, ‎May‎ ‎23‎, ‎2018‎ ‎10‎:‎51‎:‎51‎ ‎PM‎ ‎CST, Feiyun Wang <feiyunw at yahoo.com> wrote:  
 
  Hi Boris,
Thanks for your advice on build2 MSVC installation.
I downloaded some files and their sha256 from https://stage.build2.org/0/:
1. build2-baseutils-0.7.0-a.0-x86_64-windows.zip
2. build2-install-0.7.0-a.0-stage-msvc.bat
3. build2-mingw-0.7.0-a.0-x86_64-windows.tar.xz
4. build2-toolchain-0.7.0-a.0.20180519162456.33915a524877.tar.xz
Here is my report:1. Following the [installation guide](https://build2.org/build2-toolchain/doc/build2-toolchain-install.xhtml#BOOTSTRAP-MSVC), I got some error and stopped:
````
...
C:\build2-build\build2-toolchain-0.7.0-a.0.20180522141759.4db23615b182\build2>build2\b-boot  config.cxx=cl config.bin.lib=static build2\exe{b}
error: unable to parse /showIncludes include error line 'C:\build2-build\build2-toolchain-0.7.0-a.0.20180522141759.4db23615b182\libpkgconf\libpkgconf/config.h(9): fatal error C1083: 无法打开包括文件: “libpkgconf/version.h”: No such file or directory'
````I copied C:\build2-build\build2-toolchain-0.7.0-a.0.20180522141759.4db23615b182\libpkgconf\libpkgconf\version.h.in to version.h and modified it like:
- #define PACKAGE_VERSION "$libpkgconf.version.project_id$"
+ #define PACKAGE_VERSION "1.4.0-a.0.z"2. The 2nd time I ran .\build-msvc.bat, it yielded:````
...
C:\build2-build\build2-toolchain-0.7.0-a.0.20180522141759.4db23615b182\build2>build2\b-boot  config.cxx=cl config.bin.lib=static build2\exe{b}
ver ..\libpkgconf\libpkgconf\version.h.in
error: unable to parse /showIncludes include error line 'C:\build2-build\build2-toolchain-0.7.0-a.0.20180522141759.4db23615b182\build2\build2/utility.hxx(36): fatal error C1083: 无法打开包括文件: “build2/version.hxx”: No such file or directory'
````I copied C:\build2-build\build2-toolchain-0.7.0-a.0.20180522141759.4db23615b182\build2\build2\version.hxx.in to version.h and modified it like:
````
#define BUILD2_VERSION       9999999990000ULL
#define BUILD2_VERSION_STR   "999.999.999"
#define BUILD2_VERSION_ID    "999.999.999"#define BUILD2_VERSION_MAJOR 999
#define BUILD2_VERSION_MINOR 999
#define BUILD2_VERSION_PATCH 999#define BUILD2_PRE_RELEASE   999#define BUILD2_SNAPSHOT      9999999990000ULL
#define BUILD2_SNAPSHOT_ID   "999.999.999"#include <libbutl/version.hxx>#ifdef LIBBUTL_VERSION
#  if !((LIBBUTL_VERSION > 69990001ULL || (LIBBUTL_VERSION == 69990001ULL && LIBBUTL_SNAPSHOT >= 1ULL)) && LIBBUTL_VERSION < 69990010ULL)
#    error incompatible libbutl version, libbutl [0.7.0-a.0.1 0.7.0-a.1) is required
#  endif
#endif
````3. The 3rd time I ran .\build-msvc.bat, it yielded:
````
...
C:\build2-build\build2-toolchain-0.7.0-a.0.20180522141759.4db23615b182>build2\build2\b-boot  install: build2\ bpkg\
ver libbpkg\libbpkg\version.hxx.in
ver libodb-sqlite\odb\sqlite\version-build2.hxx.in
ver libodb\odb\version-build2.hxx.in
error: unable to parse /showIncludes include error line 'C:\build2-build\build2-toolchain-0.7.0-a.0.20180522141759.4db23615b182\bpkg\bpkg/utility.hxx(21): fatal error C1083: 无法打开包括文件: “bpkg/version.hxx”: No such file or directory'
````I copied C:\build2-build\build2-toolchain-0.7.0-a.0.20180522141759.4db23615b182\bpkg\bpkg\version.hxx.in to version.hxx and modified it like:
````
#define BPKG_VERSION       9999999990000ULL
#define BPKG_VERSION_STR   "999.999.999"
#define BPKG_VERSION_ID    "999.999.999"#define BPKG_VERSION_MAJOR 999
#define BPKG_VERSION_MINOR 999
#define BPKG_VERSION_PATCH 999#define BPKG_PRE_RELEASE   999#define BPKG_SNAPSHOT      9999999990000ULL
#define BPKG_SNAPSHOT_ID   "999.999.999"#include <libbutl/version.hxx>
#include <libbpkg/version.hxx>
#include <odb/version.hxx>
#include <odb/sqlite/version.hxx>
````4. I ran command: build2\build2\b-boot  install: build2\ bpkg\
It finished with:
````
install bpkg\doc{LICENSE}
install bpkg\doc{NEWS}
install bpkg\doc{README}
install bpkg\manifest{manifest}C:\build2-build\build2-toolchain-0.7.0-a.0.20180522141759.4db23615b182>
````
I guess it means a successful build2 installation?
I tried build2-install-0.7.0-a.0-stage-msvc.bat too, but it had the same problems as above.
Sincerely,
Feiyun Wang

    On ‎Monday‎, ‎May‎ ‎21‎, ‎2018‎ ‎06‎:‎41‎:‎25‎ ‎PM‎ ‎CST, Boris Kolpackov <boris at codesynthesis.com> wrote:  
 
 Feiyun Wang <feiyunw at yahoo.com> writes:

> I suggest to change "-std=c++1y" to "-std=gnu++14" for g++ options.
> BTW, "-std=c++14" doesn't work either.

c++1y allows building build2 with older compilers (like GCC 4.9) that
don't recognize c++14. And since changing to c++14 didn't make any
difference, there is no reason to change it, is there?


> __POSIX_VISIBLE is ruining my pthreading on cygwin

Cygwin is not our primary platform. If you can come up with a fix,
I would be happy to review/apply, but we ourselves unfortunately
have no resources to investigate this.

Also, I would suggest that you use staged build2 for your testing
since it included all the latest features/fixes:

https://stage.build2.org/0/
    
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.build2.org/archives/users/attachments/20180523/b3c0c20d/attachment-0001.html>


More information about the users mailing list