Re: [Mingw-w64-public] Is there a libbacktrace library for mingw-64/gcc

2017-05-30 Thread Edward Diener

On 5/30/2017 2:45 PM, niXman wrote:

Edward Diener 2017-05-30 20:43:

My bad, sorry :(
Fixed in the develop branch.
Please pull and rerun.


I now get:

-> Checking for installed packages...
the following packages are not installed: 
git,subversion,tar,zip,p7zip,make,patch,automake,autoconf,libtool,flex,bison,gettext,gettext-devel,wget,sshpass,texinfo


but all the above packages are already installed.





--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


[Mingw-w64-public] Difficulty using Boost library with MSYS2/MINGW64

2017-05-30 Thread Leif AMO
It's been a while since I installed MinGW-w64 so I can't remember the 
specific installation options selected (thread models, etc), or if that 
is relevant.


I've been able to compile a few relatively simple C and C++ programs. 
Using the MSYS2/MINGW64 shell for program compilation.  Installed boost 
for using pacman under the MSYS2 shell (not MINGW32 or MINGW64).


pacman -Ss | grep boost
mingw32/mingw-w64-i686-boost 1.63.0-1 [installed]
mingw64/mingw-w64-x86_64-boost 1.63.0-1 [installed]

I'm able to compile and run a "simple" boost example (simple.cpp.txt [1] 
attached) without errors using:


g++ simple.cpp -o simple

However, when trying to compile the program_options "first" example 
(po_first.cpp.txt attached), I get a lot of errors (po_first.log.txt).


g++ po_first.cpp -o po_first

I don't know if I set up MinGW-w64 correctly, or if I need to specify 
includes or libraries to link to on g++ command line.  Any tips appreciated.


[1] Note: Attachments given .txt extension in hopes that mailing list 
software doesn't eat the file.  Rename locally as needed.
#include 
#include 
#include 
#include 

int main()
{
using namespace boost::lambda;
typedef std::istream_iterator in;

std::for_each(
in(std::cin), in(), std::cout << (_1 * 3) << " " );
}
// Copyright Vladimir Prus 2002-2004.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)

/* The simplest usage of the library.
 */

#include 
namespace po = boost::program_options;

#include 
#include 
using namespace std;

int main(int ac, char* av[])
{
try {

po::options_description desc("Allowed options");
desc.add_options()
("help", "produce help message")
("compression", po::value(), "set compression 
level")
;

po::variables_map vm;
po::store(po::parse_command_line(ac, av, desc), vm);
po::notify(vm);

if (vm.count("help")) {
cout << desc << "\n";
return 0;
}

if (vm.count("compression")) {
cout << "Compression level was set to "
 << vm["compression"].as() << ".\n";
} else {
cout << "Compression level was not set.\n";
}
}
catch(exception& e) {
cerr << "error: " << e.what() << "\n";
return 1;
}
catch(...) {
cerr << "Exception of unknown type!\n";
}

return 0;
}
E:\msys64\tmp\ccGFMUW8.o:first.cpp:(.text+0x86): undefined reference to 
`boost::program_options::options_description::options_description(std::__cxx11::basic_string const&, unsigned int, unsigned 
int)'
E:\msys64\tmp\ccGFMUW8.o:first.cpp:(.text+0xb8): undefined reference to 
`boost::program_options::options_description::add_options()'
E:\msys64\tmp\ccGFMUW8.o:first.cpp:(.text+0xdc): undefined reference to 
`boost::program_options::options_description_easy_init::operator()(char const*, 
char const*)'
E:\msys64\tmp\ccGFMUW8.o:first.cpp:(.text+0xf5): undefined reference to 
`boost::program_options::options_description_easy_init::operator()(char const*, 
boost::program_options::value_semantic const*, char const*)'
E:\msys64\tmp\ccGFMUW8.o:first.cpp:(.text+0x101): undefined reference to 
`boost::program_options::variables_map::variables_map()'
E:\msys64\tmp\ccGFMUW8.o:first.cpp:(.text+0x163): undefined reference to 
`boost::program_options::store(boost::program_options::basic_parsed_options
 const&, boost::program_options::variables_map&, bool)'
E:\msys64\tmp\ccGFMUW8.o:first.cpp:(.text+0x18d): undefined reference to 
`boost::program_options::notify(boost::program_options::variables_map&)'
E:\msys64\tmp\ccGFMUW8.o:first.cpp:(.text+0x210): undefined reference to 
`boost::program_options::operator<<(std::ostream&, 
boost::program_options::options_description const&)'
E:\msys64\tmp\ccGFMUW8.o:first.cpp:(.text$_ZN5boost15program_options16validation_errorC1ENS1_6kind_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_i[_ZN5boost15program_options16validation_errorC1ENS1_6kind_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_i]+0x2f):
 undefined reference to 
`boost::program_options::validation_error::get_template[abi:cxx11](boost::program_options::validation_error::kind_t)'
E:\msys64\tmp\ccGFMUW8.o:first.cpp:(.text$_ZN5boost15program_options16validation_errorC1ENS1_6kind_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_i[_ZN5boost15program_options16validation_errorC1ENS1_6kind_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_i]+0x4e):
 undefined reference to 

Re: [Mingw-w64-public] Is there a libbacktrace library for mingw-64/gcc

2017-05-30 Thread niXman

Edward Diener 2017-05-31 02:16:


I now get:

-> Checking for installed packages...
the following packages are not installed:
git,subversion,tar,zip,p7zip,make,patch,automake,autoconf,libtool,flex,bison,gettext,gettext-devel,wget,sshpass,texinfo

but all the above packages are already installed.



please pull and rerun again.


--
Regards, niXman
___
Dual-target(32 & 64-bit) MinGW-W64 compilers for 32 and 64-bit Windows:
https://sf.net/p/mingw-w64/

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Difficulty using Boost library with MSYS2/MINGW64

2017-05-30 Thread Norbert Pfeiler
Your setup is fine, and yes you need to specify libraries to resolve your
undefined references.
I’d consider using cmake to avoid having to figure out the necessary
library names yourself:
find_package(Boost REQUIRED COMPONENTS program_options)
target_link_libraries(${PROJECT_NAME} Boost::program_options)

which links to msys64/mingw64/lib/libboost_program_options-mt.dll.a in my
case

Best, Norbert.

On Wed, May 31, 2017 at 2:08 AM Leif AMO  wrote:

> It's been a while since I installed MinGW-w64 so I can't remember the
> specific installation options selected (thread models, etc), or if that
> is relevant.
>
> I've been able to compile a few relatively simple C and C++ programs.
> Using the MSYS2/MINGW64 shell for program compilation.  Installed boost
> for using pacman under the MSYS2 shell (not MINGW32 or MINGW64).
>
>  pacman -Ss | grep boost
>  mingw32/mingw-w64-i686-boost 1.63.0-1 [installed]
>  mingw64/mingw-w64-x86_64-boost 1.63.0-1 [installed]
>
> I'm able to compile and run a "simple" boost example (simple.cpp.txt [1]
> attached) without errors using:
>
>  g++ simple.cpp -o simple
>
> However, when trying to compile the program_options "first" example
> (po_first.cpp.txt attached), I get a lot of errors (po_first.log.txt).
>
>  g++ po_first.cpp -o po_first
>
> I don't know if I set up MinGW-w64 correctly, or if I need to specify
> includes or libraries to link to on g++ command line.  Any tips
> appreciated.
>
> [1] Note: Attachments given .txt extension in hopes that mailing list
> software doesn't eat the file.  Rename locally as needed.
>
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [PATCH 2/2] sal.h: Disable __in and __out macros when using libstdc++.

2017-05-30 Thread Kai Tietz
Jacek,

thanks for fixing this.  Please go ahead, and apply.

Cheers,
Kai

2017-05-29 22:01 GMT+02:00 Jacek Caban :
> Hi David,
>
>
> Good catch, thanks. I sent a fixed version.
>
>
> Jacek
>
>
>
> On 5/29/17 9:56 PM, David Grayson wrote:
>>
>> The boolean logic in the patch looks wrong to me.  You're going to end
>> up disabling __in and __out for all GCC and Clang programs regardless
>> of what language they use because __GNUC__ will be defined.
>>
>> Seems like this would be better:
>>
>> #if defined(__cplusplus) && defined(__GNUC__)
>> // Don't define __in and __out because they conflict with libstdc++.
>> #else
>> #define __in
>> #define __out
>> #endif
>>
>> --David
>>
>>
>>
>> On Mon, May 29, 2017 at 12:43 PM, Jacek Caban 
>> wrote:
>>>
>>> I've seen a very good news that a fix to libstdc++ is on its way and
>>> that's
>>> great. However, we need to support already released versions as well.
>>> That's
>>> why I propose this patch. Ideally, we'd use __GLIBCXX__ macro, but it's
>>> not
>>> available without including any standard header and sal.h is not a good
>>> place to do that. In the future, when libstdc++ is fixed, we may change
>>> guards to be version-dependent.
>>>
>>> Signed-off-by: Jacek Caban 
>>> ---
>>>   mingw-w64-headers/include/sal.h | 8 +++-
>>>   1 file changed, 7 insertions(+), 1 deletion(-)
>>>
>>>
>>>
>>>
>>> --
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>> ___
>>> Mingw-w64-public mailing list
>>> Mingw-w64-public@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>>>
>>
>> --
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> ___
>> Mingw-w64-public mailing list
>> Mingw-w64-public@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
>
>
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


[Mingw-w64-public] Problem with GCC 8 and _xgetbv

2017-05-30 Thread Mateusz
Hello,

>From revision 248028 in GCC 8 there is defined function _xgetbv:
https://gcc.gnu.org/viewcvs/gcc/trunk/gcc/config/i386/xsaveintrin.h?r1=248028=248027=248028

It conflicting with mingw-w64 definition from 
mingw-w64-headers/include/psdk_inc/intrin-impl.h

I made workaround for mingw-w64:
diff --git a/mingw-w64-headers/include/psdk_inc/intrin-impl.h 
b/mingw-w64-headers/include/psdk_inc/intrin-impl.h
index 340d6fb..f5fd84b 100644
--- a/mingw-w64-headers/include/psdk_inc/intrin-impl.h
+++ b/mingw-w64-headers/include/psdk_inc/intrin-impl.h
@@ -1631,6 +1631,7 @@ __buildmov(__movsd, unsigned __LONG32, "d")
 #define __INTRINSIC_DEFINED___movsd
 #endif /* __INTRINSIC_PROLOG */
 
+#if __GNUC__ < 8 /* GCC 8 already has _xgetbv defined */
 /* NOTE: This should be in immintrin.h */
 #if __INTRINSIC_PROLOG(_xgetbv)
 unsigned __int64 _xgetbv(unsigned int);
@@ -1654,6 +1655,7 @@ unsigned __int64 _xgetbv(unsigned int index)
 #endif
 #define __INTRINSIC_DEFINED__xgetbv
 #endif /* __INTRINSIC_PROLOG */
+#endif /* __GNUC__ < 8 */
 
 #endif /* defined(__x86_64__) || defined(_AMD64_) || defined(__i386__) || 
defined(_X86_) */

If someone has a better idea how to fix this, it will be appreciated.

Mateusz


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Is there a libbacktrace library for mingw-64/gcc

2017-05-30 Thread niXman

Edward Diener 2017-05-31 07:26:

Not found level for patch
libiconv/0001-compile-relocatable-in-gnulib.mingw.patch, error=2


I do not understand what's going on...

please exec the 'pacman -S patch' cmd and rerun building again.


--
Regards, niXman
___
Dual-target(32 & 64-bit) MinGW-W64 compilers for 32 and 64-bit Windows:
https://sf.net/p/mingw-w64/

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Is there a libbacktrace library for mingw-64/gcc

2017-05-30 Thread Edward Diener

On 5/30/2017 10:59 PM, niXman wrote:

Edward Diener 2017-05-31 02:16:


I now get:

-> Checking for installed packages...
the following packages are not installed:
git,subversion,tar,zip,p7zip,make,patch,automake,autoconf,libtool,flex,bison,gettext,gettext-devel,wget,sshpass,texinfo 



but all the above packages are already installed.



please pull and rerun again.


-> start building i686-7.1.0-posix-dwarf-rt_v5-rev0 with "c,c++,fortran" 
languages supported

-> libiconv
---> libiconv-1.14.tar.gz downloaded
---> libiconv-1.14.tar.gz unpacked
--> patching...
Not found level for patch 
libiconv/0001-compile-relocatable-in-gnulib.mingw.patch, error=2




--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Is there a libbacktrace library for mingw-64/gcc

2017-05-30 Thread Edward Diener

On 5/29/2017 6:28 AM, niXman wrote:

Edward Diener 2017-05-29 05:26:


Following instructions I eventually get under MSYS2:

-> libiconv
--> download libiconv-1.14.tar.gz... done
--> unpack libiconv-1.14.tar.gz... done
--> patching...
Not found level for patch
libiconv/0001-compile-relocatable-in-gnulib.mingw.patch, error=2


This is because the patch package was not installed.

Fixed in develop branch.


I pulled the latest but the same error still occurs.




--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Is there a libbacktrace library for mingw-64/gcc

2017-05-30 Thread niXman

Edward Diener 2017-05-30 19:48:


Yes.


Please remove completely the mingw-builds and the c:\mingw710 directory, 
clone the mingw-builds again and checkout to the develop branch, and run 
again:
./build --mode=gcc-7.1.0 --bootstrap --buildroot=/c/mingw710 
--threads=posix --exceptions=dwarf --arch=i686 --bin-compress --jobs=2 
--rev=0 --rt-version=v5



--
Regards, niXman
___
Dual-target(32 & 64-bit) MinGW-W64 compilers for 32 and 64-bit Windows:
https://sf.net/p/mingw-w64/

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Is there a libbacktrace library for mingw-64/gcc

2017-05-30 Thread Edward Diener

On 5/30/2017 1:14 PM, niXman wrote:

Edward Diener 2017-05-30 19:48:


Yes.


Please remove completely the mingw-builds and the c:\mingw710 directory, 
clone the mingw-builds again and checkout to the develop branch, and run 
again:
./build --mode=gcc-7.1.0 --bootstrap --buildroot=/c/mingw710 
--threads=posix --exceptions=dwarf --arch=i686 --bin-compress --jobs=2 
--rev=0 --rt-version=v5


The same error still occurs when I try it:

./build --mode=gcc-7.1.0 --bootstrap --buildroot=/c/mingw710 
--threads=posix --exceptions=dwarf --arch=i686 --bin-compress --jobs=2 
--rev=0 --rt-version=v5

-> Checking OS bitness... 64-bit
-> Checking OS type... MINGW32_NT-6.3
-> Checking for installed packages... done
-> i686 toolchain
--> i686 toolchain is not installed --> download 
i686-6.3.0-release-posix-dwarf-rt_v5-rev2.7z... done

--> unpack i686-6.3.0-release-posix-dwarf-rt_v5-rev2.7z... done
-> start building i686-7.1.0-posix-dwarf-rt_v5-rev0 with "c,c++,fortran" 
languages supported

-> libiconv
--> download libiconv-1.14.tar.gz... done
--> unpack libiconv-1.14.tar.gz... done
--> patching...
Not found level for patch 
libiconv/0001-compile-relocatable-in-gnulib.mingw.patch, error=2



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Is there a libbacktrace library for mingw-64/gcc

2017-05-30 Thread niXman

Edward Diener 2017-05-30 20:43:

Please show the result of the 'uname && echo $PATH && which patch' cmd.


--
Regards, niXman
___
Dual-target(32 & 64-bit) MinGW-W64 compilers for 32 and 64-bit Windows:
https://sf.net/p/mingw-w64/

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Is there a libbacktrace library for mingw-64/gcc

2017-05-30 Thread niXman

Edward Diener 2017-05-30 18:10:


I pulled the latest but the same error still occurs.


Do you use the develop branch?



--
Regards, niXman
___
Dual-target(32 & 64-bit) MinGW-W64 compilers for 32 and 64-bit Windows:
https://sf.net/p/mingw-w64/

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Is there a libbacktrace library for mingw-64/gcc

2017-05-30 Thread Edward Diener

On 5/30/2017 12:25 PM, niXman wrote:

Edward Diener 2017-05-30 18:10:


I pulled the latest but the same error still occurs.


Do you use the develop branch?


Yes.




--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Is there a libbacktrace library for mingw-64/gcc

2017-05-30 Thread niXman

Edward Diener 2017-05-30 20:43:

My bad, sorry :(
Fixed in the develop branch.
Please pull and rerun.


--
Regards, niXman
___
Dual-target(32 & 64-bit) MinGW-W64 compilers for 32 and 64-bit Windows:
https://sf.net/p/mingw-w64/

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public