Re: [Msys2-users] Problems compiling very simple c++ project with cmake

2016-10-14 Thread David Grayson
Hello, Michael.


I have used C++, CMake, and MSYS2 together successfully before.  Can you
try using the -G"MSYS Makefiles" argument instead of the one you are using
and see if that changes anything?  We usually use the "MSYS Makefiles"
generator.

Also, isn't there some way to make a CMake Makefile print out the actual
commands it's running?  Try "make VERBOSE=YES".

Also, while you are still debugging this, I would recommend not using "-j4"
because that can only make things worse when you're debugging a Makefile.

--David Grayson

On Thu, Oct 13, 2016 at 5:23 AM, Drobig, Michael, IN <
michael.dro...@asap-com.eu> wrote:

> Hello,
>
>
>
> i have got problems compiling a simple „Hello World“  like c++ Project
> with a fresh Msys2 installation and a MinGW64 Toolchain on Windows 7.
>
> Im using cmake to create the project.
>
>
>
> *CMakeLists.txt*
>
>
>
> cmake_minimum_required( VERSION 3.0 )
>
> project( helloName )
>
> add_executable(helloName main.cpp)
>
>
>
>
>
>
>
> *main.cpp*
>
>
>
> #include
>
> using namespace std;
>
>
>
> int main()
>
> {
>
> string name;
>
> cout << "Hello! Whats your name?";
>
> cin >> name;
>
> cout << "Hi, my name is " << name;
>
>
>
> return 0;
>
> }
>
>
>
>
>
> The following “cmake” operation works fine:
>
>
>
> cmake -G"Eclipse CDT4 - Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug
> -DCMAKE_ECLIPSE_VERSION=4.6.1 -DCMAKE_CXX_COMPILER_ARG1=-std=c++11
>
>
>
> But if I try “make –j4” I got the error:
>
>
>
> [ 50%] Building CXX object CMakeFiles/helloName.dir/main.cpp.obj
>
> [100%] Linking CXX executable helloName
>
> CMakeFiles/helloName.dir/main.cpp.obj: In function `main':
>
> C:/Work/DevEnv/mingw64_checking/main.cpp:6: undefined reference to
> `std::__cxx11::basic_string std::allocator >::basic_string()'
>
> C:/Work/DevEnv/mingw64_checking/main.cpp:7: undefined reference to
> `std::basic_ostream& std::operator<<
> (std::basic_ostream std::char_traits >&, char const*)'
>
> C:/Work/DevEnv/mingw64_checking/main.cpp:8: undefined reference to
> `std::basic_istream& std::operator>> std::char_traits, std::allocator >(std::basic_istre
> am&, std::__cxx11::basic_string std::char_traits, std::allocator >&)'
>
> C:/Work/DevEnv/mingw64_checking/main.cpp:9: undefined reference to
> `std::basic_ostream& std::operator<<
> (std::basic_ostream std::char_traits >&, char const*)'
>
> C:/Work/DevEnv/mingw64_checking/main.cpp:9: undefined reference to
> `std::basic_ostream& std::operator<<  std::char_traits, std::allocator >(std::basic_ostr
> eam&, std::__cxx11::basic_string std::char_traits, std::allocator > const&)'
>
> C:/Work/DevEnv/mingw64_checking/main.cpp:6: undefined reference to
> `std::__cxx11::basic_string std::allocator >::~basic_string()'
>
> C:/Work/DevEnv/mingw64_checking/main.cpp:6: undefined reference to
> `std::__cxx11::basic_string std::allocator >::~basic_string()'
>
> CMakeFiles/helloName.dir/main.cpp.obj: In function `__tcf_0':
>
> C:/msys64/mingw64/include/c++/6.2.0/iostream:74: undefined reference to
> `std::ios_base::Init::~Init()'
>
> CMakeFiles/helloName.dir/main.cpp.obj: In function
> `__static_initialization_and_destruction_0':
>
> C:/msys64/mingw64/include/c++/6.2.0/iostream:74: undefined reference to
> `std::ios_base::Init::Init()'
>
> CMakeFiles/helloName.dir/main.cpp.obj:main.cpp:(.data+0x0): undefined
> reference to `__gxx_personality_seh0'
>
> CMakeFiles/helloName.dir/main.cpp.obj:main.cpp:(.xdata+0xc): undefined
> reference to `__gxx_personality_seh0'
>
> CMakeFiles/helloName.dir/main.cpp.obj:main.cpp:(.rdata$.
> refptr._ZSt3cin[.refptr._ZSt3cin]+0x0): undefined reference to `std::cin'
>
> CMakeFiles/helloName.dir/main.cpp.obj:main.cpp:(.rdata$.
> refptr._ZSt4cout[.refptr._ZSt4cout]+0x0): undefined reference to
> `std::cout'
>
> collect2.exe: error: ld returned 1 exit status
>
> make[2]: *** [CMakeFiles/helloName.dir/build.make:95: helloName] Fehler 1
>
> make[1]: *** [CMakeFiles/Makefile2:68: CMakeFiles/helloName.dir/all]
> Fehler 2
>
> make: *** [Makefile:84: all] Fehler 2
>
>
>
>
>
> Thank you,
>
>
>
> Michael
>
>
>
>
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> Msys2-users mailing list
> Msys2-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/msys2-users
>
>
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! 

Re: [Msys2-users] Helping out with MinGW-w64/MSYS2

2016-10-14 Thread Mario Emmenlauer

Hi,

I would be willing to host a continuous integration server, if my
spare resources are sufficient. However I lack a bit the knowledge
to set up a Jenkins instance for this many hundred packages in a
single GIT repository, also with inter-dependencies. It would be
awesome to have such a build service that builds all dependent
packages on every commit, and can "blame" the individual commit for
downstream errors (i.e. gcc for all the failures you found). Anyone
experience with setting this up and can lend a hand? Or anyone got
spare time to burn to aid me through the setup? :-)

All the best,

   Mario



On 14.10.2016 21:26, Alan W. Irwin wrote:
> On 2016-10-14 06:20+0300 Alexpux wrote:
> 
>> Well this is free time project and I can’t spent more time on this. I have  
>> real work too. So in some day it will be fixed.
> 
> Hi Alex:
> 
> Sounds from the above that you are really pressed for time and might
> need some "crowd-source" help with this useful and important
> MinGW-w64/MSYS2 effort.  However, I looked over your website and SF
> wiki, but saw nothing there about how knowledgeable users could help.
> If there is something that could be done along those lines (my guess
> is systematically updating/building/testing all packages would
> qualify) can you write up something in your wiki about it?
> 
> I don't have access to MinGW-w64/MSYS2 at the moment, but I am in
> close contact with PLplot developers who do, and they really like it.
> So I would like to recommend to them some way they could help this
> project, and also I would like to do that for myself in the future,
> but I cannot find anything on this topic.
> 
> Alan
> __
> Alan W. Irwin



Viele Gruesse,

Mario Emmenlauer


--
BioDataAnalysis GmbH, Mario Emmenlauer  Tel. Buero: +49-89-74677203
Balanstr. 43   mailto: memmenlauer * biodataanalysis.de
D-81669 München  http://www.biodataanalysis.de/

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Msys2-users mailing list
Msys2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/msys2-users


Re: [Msys2-users] Bootstrap gcc for i686 with SJLJ exception model in MSYS2 ?

2016-10-14 Thread lhmouse
Problem solved.

I didn't delete MSYS2 gcc's libraries and it was these libraries that were 
linked
rather than mingwbuilds' libraries.
However, even GCC itself does not ask for libgcc_s_dw2, the libgomp DLL
from MSYS2 packages still asks for it, as well as other packages.
Hence the DLL must not be removed.

--   
Best regards,
lh_mouse
2016-10-14

-
发件人:"lhmouse"
发送日期:2016-10-14 01:21
收件人:Msys2,mingw-w64-public
抄送:
主题:[Msys2-users] Bootstrap gcc for i686 with SJLJ exception model in
MSYS2 ?

Today I tried bootstrapping GCC 6.2.1 using PKGBUILD modified from
the MSYS2 one for gcc-git package.
I changed the line 
https://github.com/lhmouse/MINGW-packages/blob/master/mingw-w64-gcc-git/PKGBUILD#L148
from `local _conf="--disable-sjlj-exceptions --with-dwarf2"`
to `local _conf="--enable-sjlj-exceptions"`,
and the 3-stage bootstrap started at the end of stage 1 with thousands of
undefined references to _Unwind_* functions.

I tried both MSYS2 toolchains (with DWARF) and mingw-builds toolchains (with 
SJLJ)
and the latter failed with fewer yet the same errors.

Do you have any ideas why this error happened?

--
Best regards,
lh_mouse
2016-10-14


--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Msys2-users mailing list
Msys2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/msys2-users



--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Msys2-users mailing list
Msys2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/msys2-users