Re: [Msys2-users] Avoid reference to libwinpthread-1.dll for 64-bit links

2017-01-20 Thread lhmouse
On 2017/1/21 6:01, Computer Jock wrote:
> I hope I know what I'm talking about here...
>
> Sometimes (probably with g++) when attempting to create a 64-bit DLL
> with only windows dependencies one gets a reference to:
>
>libwinpthread-1.dll => /mingw64/bin/libwinpthread-1.dll
>
> Googling for solutions finds quite a few people having the same problem.
>
> Many suggest using:
>
>   g++ -shared ...
>   -static-libgcc -static-libstdc++
>-Wl,-Bstatic
>-lstdc++
>-lpthread
>-Wl,-Bdynamic
>
> That works for some links but not for others.
>
> I ran across this debian bug report from 2014:
>
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=748353
>
> It suggests that it would be possible to avoid the reference to
> libwinpthread-1.dll in favor of the default windows threading library.
 >
That is not possible as long as you are using a GCC with the `posix` 
thread model. You have to build one yourself since MSYS2 does not 
provide such a toolchain AFAIK.

> Two related questions:
>
> 1) Is there a way to ensure statically linking -lpthread and avoid the
> reference to libwinpthread-1.dll ?
Yes. Just delete the file `libwinpthread.dll.a`.

One more word: `-lpthread` is basically *wrong*. To compile and link 
with pthread, use `-pthread` (no `l` there).

> 2) Would the fix (I assume they fixed it for debian) work for the msys2
> 64-bit gcc?
Yes. GCC prefers dynamic libraries unless `-static` is given. When a 
dynamic library isn't available it looks for the corresponding static 
library instead. You do have `libwinpthread.a`, no?

-- 
Best regards,
LH_Mouse


--
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] gcc6 problem when source uses the restrict keyword

2016-10-29 Thread lhmouse
gcc6 enables -std=c11 by default and `restrict` is a key word there.
Such behavior can be disabled by requesting `-std=gnu89` explicitly.

--   
Best regards,
lh_mouse
2016-10-29

-
发件人:ralph engels 
发送日期:2016-10-29 20:27
收件人:David Grayson
抄送:Msys2
主题:Re: [Msys2-users] gcc6 problem when source uses the restrict keyword

It applies to quite a few packages, problem seems to be that previous 
gcc did not support the restrict keyword,

so it newer errored out when compiling a source that used the restrict 
keyword in some other context (like the codelite source code, which uses 
restrict in an enumerator).

I got around the bug by renaming restrict to something else -> 
restrictAction.


Den 28-10-2016 kl. 22:46 skrev David Grayson:
> What about using __restrict instead?
>
> --David
>
> On Fri, Oct 28, 2016 at 7:46 AM, ralph engels  > wrote:
>
> Not sure whats changed ? but after updating to gcc6 the restrict
> keyword
> can no longer be used and throws an error.
>
> Supplying -std=c99 to flags does not fix it either.
>
>
> 
> --
> The Command Line: Reinvented for Modern Developers
> Did the resurgence of CLI tooling catch you by surprise?
> Reconnect with the command line and become more productive.
> Learn the new .NET and ASP.NET  CLI. Get your free
> copy!
> http://sdm.link/telerik
> ___
> Msys2-users mailing list
> Msys2-users@lists.sourceforge.net
> 
> https://lists.sourceforge.net/lists/listinfo/msys2-users
> 
>
>


--
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive. 
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik
___
Msys2-users mailing list
Msys2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/msys2-users




--
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive. 
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik
___
Msys2-users mailing list
Msys2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/msys2-users


Re: [Msys2-users] Fwd: emacs problems missing file msys-gobject-2.0-0.dll

2016-11-13 Thread lhmouse
C:\Users\LH_Mouse>pacman -Fs msys-gobject-2.0-0.dll
msys/glib2 2.48.0-1
usr/bin/msys-gobject-2.0-0.dll

C:\Users\LH_Mouse>pacman -Fy
:: Synchronizing package databases...
 mingw32 is up to date
 mingw64 is up to date
 msys is up to date

C:\Users\LH_Mouse>pacman -Fs msys-gobject-2.0-0.dll
msys/glib2 2.48.0-1
usr/bin/msys-gobject-2.0-0.dll

C:\Users\LH_Mouse>pacman -S glib2
warning: glib2-2.48.0-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) glib2-2.48.0-1

Total Download Size:   1.70 MiB
Total Installed Size:  9.83 MiB
Net Upgrade Size:  0.00 MiB

:: Proceed with installation? [Y/n]



--   
Best regards,
lh_mouse
2016-11-13

-
发件人:Yongchao Ge 
发送日期:2016-11-13 11:00
收件人:msys2-users
抄送:
主题:[Msys2-users] Fwd: emacs problems missing file
msys-gobject-2.0-0.dll

Hi,

I just installed msys2 on windows 10 64 bit and did the update and
installed emacs, but I can not use it. My google search on the missing file
msys-gobject-2.0-0.dll does not give me ideas on how to solve the problem.

I'm able to to use git wget on msys2, but not emacs, is this related to the
GUI, or X-windows?

At https://sourceforge.net/p/msys2/wiki/Packages/ I've seen a lot packages
are using gobject. How can resolve this probem?

Thanks,

Yongchao

$ pacman -Ss emacs
mingw32/mingw-w64-i686-emacs 25.1-1
The extensible, customizable, self-documenting, real-time display editor
(mingw-w64)
mingw64/mingw-w64-x86_64-emacs 25.1-1
The extensible, customizable, self-documenting, real-time display editor
(mingw-w64)
msys/emacs 25.1-1 (editors) [installed]
The extensible, customizable, self-documenting, real-time display editor
(msys2)

$ emacs
C:/msys64/usr/bin/emacs.exe: error while loading shared libraries:
msys-gobject-2.0-0.dll: cannot open shared object file: No such file or
directory

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
___
Msys2-users mailing list
Msys2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/msys2-users




--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
___
Msys2-users mailing list
Msys2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/msys2-users


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

2016-10-13 Thread lhmouse
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


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"<lh_mo...@126.com>
发送日期: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