Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Deliver yesterday, code today, think tomorrow.


devel / comp.lang.c / Re: Compile public library on mingw64 error!

SubjectAuthor
* Compile public library on mingw64 error!spender
+* Re: Compile public library on mingw64 error!Janis Papanagnou
|`- Re: Compile public library on mingw64 error!spender
+- Re: Compile public library on mingw64 error!Kaz Kylheku
`* Re: Compile public library on mingw64 error!Keith Thompson
 `* Re: Compile public library on mingw64 error!David Brown
  `- Re: Compile public library on mingw64 error!Keith Thompson

1
Compile public library on mingw64 error!

<ulb7gu$3t0bp$2@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=30359&group=comp.lang.c#30359

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: spen...@yeah.net (spender)
Newsgroups: comp.lang.c
Subject: Compile public library on mingw64 error!
Date: Wed, 13 Dec 2023 11:13:35 +0800
Organization: A noiseless patient Spider
Lines: 45
Message-ID: <ulb7gu$3t0bp$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 13 Dec 2023 03:13:34 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b0dcf317e3c7186f3962ac1a4d14ac1a";
logging-data="4096377"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19/CqggLTnU6PS6d6XO2yi/"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:mT6aG7a3AbZqQDRPhW7c2UULYAg=
 by: spender - Wed, 13 Dec 2023 03:13 UTC

does some body can help me:
I found that mingw64 doesn't support publib libraries, so wanted to
compile one myself. After compiling the source code, this appears, how
to deal with it.
-----------------------------------
gcc -Iincludes -D__publib__ -g -O2 -Wall -MD -MF fname/fndir.d -c
fname/fndir.c -o fname/fndir.o
gcc -Iincludes -D__publib__ -g -O2 -Wall -MD -MF fname/fnhome.d -c
fname/fnhome.c -o fname/fnhome.o
fname/fnhome.c:38:10: fatal error: pwd.h: No such file or directory
38 | #include <pwd.h>
| ^~~~~~~
compilation terminated.
make: *** [Makefile:403: fname/fnhome.o] Error 1

--------------------------------------------------------------
but I found: Enviroument var:
C_INCLUDE_PATH=/mingw64/include:C:\msys64\mingw64\include
and:
ls -la /usr/include/pwd.h
-rw-r--r-- 1 spender None 2.7K Nov 30 14:03 /usr/include/pwd.h

soo:
export
C_INCLUDE_PATH=/mingw64/include:/usr/include:C:\msys64\mingw64\include

now error:
make
gcc -Iincludes -D__publib__ -g -O2 -Wall -MD -MF fname/fnhome.d -c
fname/fnhome.c -o fname/fnhome.o
In file included from fname/fnhome.c:38:
C:\msys64\usr\include/pwd.h:50:9: error: unknown type name 'uid_t'
50 | uid_t pw_uid; /* user uid */
| ^~~~~
C:\msys64\usr\include/pwd.h:51:9: error: unknown type name 'gid_t'
51 | gid_t pw_gid; /* user gid */
| ^~~~~
fname/fnhome.c: In function 'fnhome':
fname/fnhome.c:50:32: warning: implicit declaration of function
'getuid'; did you mean 'getpid'? [-W
implicit-function-declaration]
50 | pwd = getpwuid(getuid());
| ^~~~~~
| getpid
make: *** [Makefile:403: fname/fnhome.o] Error 1

Re: Compile public library on mingw64 error!

<ulb8ml$14ms$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=30362&group=comp.lang.c#30362

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.lang.c
Subject: Re: Compile public library on mingw64 error!
Date: Wed, 13 Dec 2023 04:33:41 +0100
Organization: A noiseless patient Spider
Lines: 57
Message-ID: <ulb8ml$14ms$1@dont-email.me>
References: <ulb7gu$3t0bp$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 13 Dec 2023 03:33:41 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2c7ffa95e74c13f76949958ab9163ac4";
logging-data="37596"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/nlSY4iIYjIj4vaQMu0d40"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:1EDVbtRbERZmedpNMhOtDjzTKxc=
X-Enigmail-Draft-Status: N1110
In-Reply-To: <ulb7gu$3t0bp$2@dont-email.me>
 by: Janis Papanagnou - Wed, 13 Dec 2023 03:33 UTC

On 13.12.2023 04:13, spender wrote:
> does some body can help me:
> I found that mingw64 doesn't support publib libraries, so wanted to
> compile one myself. After compiling the source code, this appears, how
> to deal with it.
> -----------------------------------
> gcc -Iincludes -D__publib__ -g -O2 -Wall -MD -MF fname/fndir.d -c
> fname/fndir.c -o fname/fndir.o
> gcc -Iincludes -D__publib__ -g -O2 -Wall -MD -MF fname/fnhome.d -c
> fname/fnhome.c -o fname/fnhome.o
> fname/fnhome.c:38:10: fatal error: pwd.h: No such file or directory
> 38 | #include <pwd.h>
> | ^~~~~~~
> compilation terminated.
> make: *** [Makefile:403: fname/fnhome.o] Error 1
>
> --------------------------------------------------------------
> but I found: Enviroument var:
> C_INCLUDE_PATH=/mingw64/include:C:\msys64\mingw64\include
> and:
> ls -la /usr/include/pwd.h
> -rw-r--r-- 1 spender None 2.7K Nov 30 14:03 /usr/include/pwd.h
>
> soo:
> export
> C_INCLUDE_PATH=/mingw64/include:/usr/include:C:\msys64\mingw64\include

Doesn't a Win/DOS system require a device character before the path?
Something like C:\usr\include (or wherever that file is located)?

>
> now error:
> make
> gcc -Iincludes -D__publib__ -g -O2 -Wall -MD -MF fname/fnhome.d -c
> fname/fnhome.c -o fname/fnhome.o
> In file included from fname/fnhome.c:38:
> C:\msys64\usr\include/pwd.h:50:9: error: unknown type name 'uid_t'
> 50 | uid_t pw_uid; /* user uid */
> | ^~~~~
> C:\msys64\usr\include/pwd.h:51:9: error: unknown type name 'gid_t'
> 51 | gid_t pw_gid; /* user gid */
> | ^~~~~
> fname/fnhome.c: In function 'fnhome':
> fname/fnhome.c:50:32: warning: implicit declaration of function
> 'getuid'; did you mean 'getpid'? [-W
> implicit-function-declaration]

Have you included the necessary header files for these functions?
#include <unistd.h>
#include <sys/types.h>

> 50 | pwd = getpwuid(getuid());
> | ^~~~~~
> | getpid
> make: *** [Makefile:403: fname/fnhome.o] Error 1

Re: Compile public library on mingw64 error!

<20231212195122.224@kylheku.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=30363&group=comp.lang.c#30363

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.hispagatos.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 433-929-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c
Subject: Re: Compile public library on mingw64 error!
Date: Wed, 13 Dec 2023 03:53:40 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <20231212195122.224@kylheku.com>
References: <ulb7gu$3t0bp$2@dont-email.me>
Injection-Date: Wed, 13 Dec 2023 03:53:40 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d0818baadc6829ffb2add097b76d730f";
logging-data="41176"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+xG97FXa5Crca0oWNUSqyTiHoqRpwvld8="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:OS6MvGRLkT6zDiekow30MLESe1c=
 by: Kaz Kylheku - Wed, 13 Dec 2023 03:53 UTC

On 2023-12-13, spender <spender@yeah.net> wrote:
> does some body can help me:
> I found that mingw64 doesn't support publib libraries, so wanted to
> compile one myself. After compiling the source code, this appears, how
> to deal with it.
> -----------------------------------
> gcc -Iincludes -D__publib__ -g -O2 -Wall -MD -MF fname/fndir.d -c
> fname/fndir.c -o fname/fndir.o
> gcc -Iincludes -D__publib__ -g -O2 -Wall -MD -MF fname/fnhome.d -c
> fname/fnhome.c -o fname/fnhome.o
> fname/fnhome.c:38:10: fatal error: pwd.h: No such file or directory
> 38 | #include <pwd.h>
> | ^~~~~~~
> compilation terminated.
> make: *** [Makefile:403: fname/fnhome.o] Error 1

Cygwin has these Unix functions. They are not particularly useful on
Windows, but they work.

Why don't you compile your program under Cygwin?

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca
NOTE: If you use Google Groups, I don't see you, unless you're whitelisted.

Re: Compile public library on mingw64 error!

<87sf46wxjl.fsf@nosuchdomain.example.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=30364&group=comp.lang.c#30364

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.chmurka.net!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: Compile public library on mingw64 error!
Date: Tue, 12 Dec 2023 20:12:30 -0800
Organization: None to speak of
Lines: 50
Message-ID: <87sf46wxjl.fsf@nosuchdomain.example.com>
References: <ulb7gu$3t0bp$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="c34340931401a0293bee67ad839d033e";
logging-data="45984"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19dHva8LOKaPN6i8Uc2LypB"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:6kQ+oCNIrYUjhq1jqEgCNEmwN9w=
sha1:wHC1O+VNsLI+ZVrsI11PVWLnbeg=
 by: Keith Thompson - Wed, 13 Dec 2023 04:12 UTC

spender <spender@yeah.net> writes:
> does some body can help me:
> I found that mingw64 doesn't support publib libraries, so wanted to
> compile one myself. After compiling the source code, this appears, how
> to deal with it.
> -----------------------------------
> gcc -Iincludes -D__publib__ -g -O2 -Wall -MD -MF fname/fndir.d -c
> fname/fndir.c -o fname/fndir.o
> gcc -Iincludes -D__publib__ -g -O2 -Wall -MD -MF fname/fnhome.d -c
> fname/fnhome.c -o fname/fnhome.o
> fname/fnhome.c:38:10: fatal error: pwd.h: No such file or directory
> 38 | #include <pwd.h>
> | ^~~~~~~
> compilation terminated.
> make: *** [Makefile:403: fname/fnhome.o] Error 1
>
> --------------------------------------------------------------
> but I found: Enviroument var:
> C_INCLUDE_PATH=/mingw64/include:C:\msys64\mingw64\include
> and:
> ls -la /usr/include/pwd.h
> -rw-r--r-- 1 spender None 2.7K Nov 30 14:03 /usr/include/pwd.h

How was C_INCLUDE_PATH set?

That value appears to be a mix of a Unix-style path:
/mingw64/include
and a Windows-style path:
C:\msys64\mingw64\include

You haven't told us what environment you're using. How exactly are you
invoking the compiler? CMD prompt? Cygwin? Powershell?

Unix-style paths use '/' as a directory delimiter, and ':' to separate
entries. Windows-style paths use '\' as a directory delimiter, and ';'
to separate entries. Don't mix them.

> soo:
> export
> C_INCLUDE_PATH=/mingw64/include:/usr/include:C:\msys64\mingw64\include

Again, don't mix Unix-style and Windows-style paths. Use the style
associated with the environment from which you're invoking the compiler.

[...]

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Will write code for food.
void Void(void) { Void(); } /* The recursive call of the void */

Re: Compile public library on mingw64 error!

<ulbp76$32qs$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=30366&group=comp.lang.c#30366

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: Compile public library on mingw64 error!
Date: Wed, 13 Dec 2023 09:15:33 +0100
Organization: A noiseless patient Spider
Lines: 81
Message-ID: <ulbp76$32qs$1@dont-email.me>
References: <ulb7gu$3t0bp$2@dont-email.me>
<87sf46wxjl.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 13 Dec 2023 08:15:34 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d5638a9cce7869132fb89cc64b2b7f63";
logging-data="101212"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18+JNh+cMVOeGScr0Nv/sDIuL24Ktmk6EE="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:9AkbRk7FnM5WW8zZCnmeakRR2SI=
Content-Language: en-GB
In-Reply-To: <87sf46wxjl.fsf@nosuchdomain.example.com>
 by: David Brown - Wed, 13 Dec 2023 08:15 UTC

On 13/12/2023 05:12, Keith Thompson wrote:
> spender <spender@yeah.net> writes:
>> does some body can help me:
>> I found that mingw64 doesn't support publib libraries, so wanted to
>> compile one myself. After compiling the source code, this appears, how
>> to deal with it.
>> -----------------------------------
>> gcc -Iincludes -D__publib__ -g -O2 -Wall -MD -MF fname/fndir.d -c
>> fname/fndir.c -o fname/fndir.o
>> gcc -Iincludes -D__publib__ -g -O2 -Wall -MD -MF fname/fnhome.d -c
>> fname/fnhome.c -o fname/fnhome.o
>> fname/fnhome.c:38:10: fatal error: pwd.h: No such file or directory
>> 38 | #include <pwd.h>
>> | ^~~~~~~
>> compilation terminated.
>> make: *** [Makefile:403: fname/fnhome.o] Error 1
>>
>> --------------------------------------------------------------
>> but I found: Enviroument var:
>> C_INCLUDE_PATH=/mingw64/include:C:\msys64\mingw64\include
>> and:
>> ls -la /usr/include/pwd.h
>> -rw-r--r-- 1 spender None 2.7K Nov 30 14:03 /usr/include/pwd.h
>
> How was C_INCLUDE_PATH set?
>
> That value appears to be a mix of a Unix-style path:
> /mingw64/include
> and a Windows-style path:
> C:\msys64\mingw64\include
>
> You haven't told us what environment you're using. How exactly are you
> invoking the compiler? CMD prompt? Cygwin? Powershell?
>
> Unix-style paths use '/' as a directory delimiter, and ':' to separate
> entries. Windows-style paths use '\' as a directory delimiter, and ';'
> to separate entries. Don't mix them.
>
>> soo:
>> export
>> C_INCLUDE_PATH=/mingw64/include:/usr/include:C:\msys64\mingw64\include
>
> Again, don't mix Unix-style and Windows-style paths. Use the style
> associated with the environment from which you're invoking the compiler.
>
> [...]
>

It is probably easier to keep track of what is what if you don't mix
path styles, but they should work fine either way. mingw64 (and gcc for
mingw64 hosts) handles conversion of path styles when accessing files.
It's even fine to mix forward and backwards slashes in the same
pathname. I personally prefer to use *nix-style pathnames when using
mingw64 programs, regardless of whether I am invoking them from a CMD
prompt, an msys2 bash, or (most commonly) "make". But that is because I
use Linux and Windows, and my makefiles must work on both systems.

But while the forward and backwards slashes should be fine, the
directory delimiter in the path chain might be an issue - I don't know
how that will work. It is unlikely to be the problem here, however,
since /mingw64/include and c:\msys64\mingw64\include refer to the same
directory (for default installations). And after adding the path to
"pwd.d" to his C_INCLUDE_PATH, the compiler clearly found that file.

No, I think the problem is simply that Windows does not support anything
directly matching *nix users, groups, and related concepts - they are
handled in a completely different way on Windows. mingw64 aims to be a
/minimal/ conversion layer between *nix-style user code and the Windows
system, and it does not support things that can't be handled directly.
It doesn't cover user names, fork(), device files, and many other such
things. Code that relies on this kind of thing is unlikely to compile,
and very unlikely to do anything sensible if forced to compile.

In the OP's case, however, the actual use of user and group information
should be quite minimal, so it could be possible to get it working.
There may be additional configuration or pre-defined macros needed when
compiling this code with mingw64 controlling conditional compilation, so
that the headers and C files adapt to the right environment.

Re: Compile public library on mingw64 error!

<87o7etx3n1.fsf@nosuchdomain.example.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=30368&group=comp.lang.c#30368

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: Compile public library on mingw64 error!
Date: Wed, 13 Dec 2023 12:13:06 -0800
Organization: None to speak of
Lines: 66
Message-ID: <87o7etx3n1.fsf@nosuchdomain.example.com>
References: <ulb7gu$3t0bp$2@dont-email.me>
<87sf46wxjl.fsf@nosuchdomain.example.com>
<ulbp76$32qs$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="c34340931401a0293bee67ad839d033e";
logging-data="1048273"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19DpCfX5HQ6D9oJ5zgeEQTM"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:6PJtVGt2vekzwkRwUF2qqvqDOZo=
sha1:J/I7fmxsFfgMZihCCTJKzezwkZY=
 by: Keith Thompson - Wed, 13 Dec 2023 20:13 UTC

David Brown <david.brown@hesbynett.no> writes:
> On 13/12/2023 05:12, Keith Thompson wrote:
>> spender <spender@yeah.net> writes:
>>> does some body can help me:
>>> I found that mingw64 doesn't support publib libraries, so wanted to
>>> compile one myself. After compiling the source code, this appears, how
>>> to deal with it.
>>> -----------------------------------
>>> gcc -Iincludes -D__publib__ -g -O2 -Wall -MD -MF fname/fndir.d -c
>>> fname/fndir.c -o fname/fndir.o
>>> gcc -Iincludes -D__publib__ -g -O2 -Wall -MD -MF fname/fnhome.d -c
>>> fname/fnhome.c -o fname/fnhome.o
>>> fname/fnhome.c:38:10: fatal error: pwd.h: No such file or directory
>>> 38 | #include <pwd.h>
>>> | ^~~~~~~
>>> compilation terminated.
>>> make: *** [Makefile:403: fname/fnhome.o] Error 1
>>>
>>> --------------------------------------------------------------
>>> but I found: Enviroument var:
>>> C_INCLUDE_PATH=/mingw64/include:C:\msys64\mingw64\include
>>> and:
>>> ls -la /usr/include/pwd.h
>>> -rw-r--r-- 1 spender None 2.7K Nov 30 14:03 /usr/include/pwd.h
>> How was C_INCLUDE_PATH set?
>> That value appears to be a mix of a Unix-style path:
>> /mingw64/include
>> and a Windows-style path:
>> C:\msys64\mingw64\include
>> You haven't told us what environment you're using. How exactly are
>> you
>> invoking the compiler? CMD prompt? Cygwin? Powershell?
>> Unix-style paths use '/' as a directory delimiter, and ':' to
>> separate
>> entries. Windows-style paths use '\' as a directory delimiter, and ';'
>> to separate entries. Don't mix them.
>>
>>> soo:
>>> export
>>> C_INCLUDE_PATH=/mingw64/include:/usr/include:C:\msys64\mingw64\include
>> Again, don't mix Unix-style and Windows-style paths. Use the style
>> associated with the environment from which you're invoking the compiler.
>> [...]
>>
>
> It is probably easier to keep track of what is what if you don't mix
> path styles, but they should work fine either way.

Not in a PATH-style environment variable.

An environment such as Cygwin might interpret "C:\msys64\mingw64\include"
correctly (as equivalent to "/cygdrive/c/msys64/mingw64/include"),
but the ":" in "C:\..." will be treated as a delimiter between elements
of the search path, so the elements will be:

/mingw64/include
/usr/include
C
\msys64\mingw64\include

We need to know what environment the OP is working in.

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Will write code for food.
void Void(void) { Void(); } /* The recursive call of the void */

Re: Compile public library on mingw64 error!

<uldua8$180h4$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=30369&group=comp.lang.c#30369

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: spen...@yeah.net (spender)
Newsgroups: comp.lang.c
Subject: Re: Compile public library on mingw64 error!
Date: Thu, 14 Dec 2023 11:54:49 +0800
Organization: A noiseless patient Spider
Lines: 68
Message-ID: <uldua8$180h4$1@dont-email.me>
References: <ulb7gu$3t0bp$2@dont-email.me> <ulb8ml$14ms$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 14 Dec 2023 03:54:49 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b0bbe1082f729678472024c3aaf21aa5";
logging-data="1311268"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19YuiKaALSireehgiTU9PQx"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:7nsEkkPcn12Is+l2CDKrQ5lt+2s=
In-Reply-To: <ulb8ml$14ms$1@dont-email.me>
 by: spender - Thu, 14 Dec 2023 03:54 UTC

Thanks everyone!

mingw64 worked at windows, soo, It don't support function:
getpwuid, More information :
https://www.gnu.org/software/gnulib//manual/html_node/getpwuid.html

Abort(). thinks

在 2023/12/13 11:33, Janis Papanagnou 写道:
> On 13.12.2023 04:13, spender wrote:
>> does some body can help me:
>> I found that mingw64 doesn't support publib libraries, so wanted to
>> compile one myself. After compiling the source code, this appears, how
>> to deal with it.
>> -----------------------------------
>> gcc -Iincludes -D__publib__ -g -O2 -Wall -MD -MF fname/fndir.d -c
>> fname/fndir.c -o fname/fndir.o
>> gcc -Iincludes -D__publib__ -g -O2 -Wall -MD -MF fname/fnhome.d -c
>> fname/fnhome.c -o fname/fnhome.o
>> fname/fnhome.c:38:10: fatal error: pwd.h: No such file or directory
>> 38 | #include <pwd.h>
>> | ^~~~~~~
>> compilation terminated.
>> make: *** [Makefile:403: fname/fnhome.o] Error 1
>>
>> --------------------------------------------------------------
>> but I found: Enviroument var:
>> C_INCLUDE_PATH=/mingw64/include:C:\msys64\mingw64\include
>> and:
>> ls -la /usr/include/pwd.h
>> -rw-r--r-- 1 spender None 2.7K Nov 30 14:03 /usr/include/pwd.h
>>
>> soo:
>> export
>> C_INCLUDE_PATH=/mingw64/include:/usr/include:C:\msys64\mingw64\include
>
> Doesn't a Win/DOS system require a device character before the path?
> Something like C:\usr\include (or wherever that file is located)?
>
>>
>> now error:
>> make
>> gcc -Iincludes -D__publib__ -g -O2 -Wall -MD -MF fname/fnhome.d -c
>> fname/fnhome.c -o fname/fnhome.o
>> In file included from fname/fnhome.c:38:
>> C:\msys64\usr\include/pwd.h:50:9: error: unknown type name 'uid_t'
>> 50 | uid_t pw_uid; /* user uid */
>> | ^~~~~
>> C:\msys64\usr\include/pwd.h:51:9: error: unknown type name 'gid_t'
>> 51 | gid_t pw_gid; /* user gid */
>> | ^~~~~
>> fname/fnhome.c: In function 'fnhome':
>> fname/fnhome.c:50:32: warning: implicit declaration of function
>> 'getuid'; did you mean 'getpid'? [-W
>> implicit-function-declaration]
>
> Have you included the necessary header files for these functions?
> #include <unistd.h>
> #include <sys/types.h>
>
>
>> 50 | pwd = getpwuid(getuid());
>> | ^~~~~~
>> | getpid
>> make: *** [Makefile:403: fname/fnhome.o] Error 1
>

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor