[go-nuts] When net package is imported building binary with CGO generate error

2023-11-02 Thread sbezverk
 

 

Hello,

 

I came across a situation when “net” package is imported regardless directly or 
indirectly via another package, go build generates these errors:

 

/sw/packages/go/1.19.4/src/net/cgo_linux.go:20:59: could not determine kind of 
name for C.AI_ALL

/sw/packages/go/1.19.4/src/net/cgo_linux.go:20:43: could not determine kind of 
name for C.AI_V4MAPPED

 

I could not find any clues on the internet, curious if somebody saw similar 
issue and somehow has fixed it.

 

Thank you

Serguei

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/D1CE6CE9-41FC-4933-AF26-DA7F1D34EAEE%40gmail.com.


Re: [go-nuts] Re: Recommended way to distribute pre-compiled C-dependencies for modules using CGO ?

2023-11-02 Thread Jason E. Aten
What I would do for that case would be to deliver the users a either a VM 
image (heavy), or a docker container (lighter) with batteries included 
inside. 

There is often little need to write a docker file unless you really want. 
Just get everything working inside docker and "docker commit" it to an 
image. I do this often for projects that need python/R + 100s of 
libraries.  Its really the only sane way to deliver sprawling dependencies 
that assume they can write all over the filesystem.  

One hint: I recently did this for code that wanted to output graphics, and 
that needed X11 (or Xvfb), and that wanted systemd, which is available in 
docker but used to be discouraged so is not available in many base images. 
So I would recommend starting an docker image that already supports systemd 
and X11, if graphics (or x11vnc, say) is ever going to be desired. Its a 
pain to add after the fact. Podman claims to be useful for this, but I 
found in immature and not really production ready when trying to run it on 
blah standard Ubuntu 22.

On Wednesday, November 1, 2023 at 9:08:51 PM UTC Jan wrote:

> Thanks @Jason, but the point was exactly not need to do anything extra: no 
> manual unzipping of a file, or manual Makefile/Magefile.
>
> Let's say project in Go links some 30 external modules, 5 of them have 
> their own specific steps that need to be read, understood and and run to 
> install them ... very quickly the user just gives up from 
> installing/compiling the thing, with good reason ... 
>
> The Go toolset solves that beautifully for Go only projects. But at least 
> in my line of work, that's not feasible, I need to interface with libraries 
> that in turn require other libraries in C++ (OpenXLA/llvm for JIT), Rust 
> (HuggingFace Tokenizer), C (Gtk), etc.
>
> cheers
>
>
>
>
> On Monday, October 30, 2023 at 7:42:19 PM UTC+1 Jason E. Aten wrote:
>
>> > including the `.a` (static libraries) in the Github just got to its 
>> limit (100Mb)
>>
>> I have used bzip2 to compress libraries that are too big for Github. If 
>> that gets them under the limit, then great. 
>> Just provide installation instructions or a Makefile target that 
>> decompresses them once checked out.
>>
>> (Or xz? Apparently it can compress more than bzip2; but I have no 
>> experience with it. https://en.wikipedia.org/wiki/XZ_Utils )
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/56491297-80a0-492f-a794-46eec374871fn%40googlegroups.com.


[go-nuts] Re: Symbolic/Concolic execution of Go compiled Binaries

2023-11-02 Thread 'Thomas DuBuisson' via golang-nuts
There was an effort to add golang as a supported language to crucible [1], 
but I think it fizzled as a one-engineer attempt. I know golang compiles 
via an SSA but is there even a spec for the SSA? Static analysis attempts 
tend to be mostly academic and thus favor something solid such as llvm (or 
more recently, rust mir). This might explain the sparse landscape.

[1] https://github.com/GaloisInc/crucible/tree/master/crucible-go

On Monday, October 30, 2023 at 5:25:56 AM UTC-7 Karolina GORNA wrote:

> Hi Gophers,
>
> Hope that your are alright!
>
> *Does any of you know symbolic or concolic execution tools that are 
> compatible with Go binaries please ? *
> From what I currently understand, it seams possible to adapt Angr 
>  for instance so that it understands Go binaries, but I 
> am not 100% sure.
> Also, I am curious if someone worked on that before.
>
> Thank you for your time,
> Karolina
>
>
> --
> Les informations contenues dans ce message électronique ainsi que celles 
> contenues dans les documents attachés sont strictement confidentielles et 
> sont destinées à l'usage exclusif du (des) destinataire(s) nommé(s).
> Toute divulgation, distribution ou reproduction, même partielle, en est 
> strictement interdite sauf autorisation écrite et expresse de l’émetteur.
> Si vous recevez ce message par erreur, veuillez le notifier immédiatement 
> à son émetteur par retour, et le détruire ainsi que tous les documents qui 
> y sont attachés.
>
> The information contained in this email and in any document enclosed is 
> strictly confidential and is intended solely for the use of the individual 
> or entity to which it is addressed.
> Partial or total disclosure, distribution or reproduction of its contents 
> is strictly prohibited unless expressly approved in writing by the sender.
> If you have received this communication in error, please notify us 
> immediately by responding to this email, and then delete the message and 
> its attached files from your system.
> --
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/45cfcf3c-4794-4a6a-97cf-e3cf38662877n%40googlegroups.com.