Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot compile on linux when import "net" #1602

Open
RudolfVonKrugstein opened this issue Jan 29, 2021 · 1 comment
Open

Cannot compile on linux when import "net" #1602

RudolfVonKrugstein opened this issue Jan 29, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@RudolfVonKrugstein
Copy link

When trying to compile this:

package main

import (
	"fmt"
	_ "net"
)


func main() {
	fmt.Println("Hello")
}

with these comands:

# docker run --privileged --rm -v $(pwd):/src -ti tinygo/tinygo bash
> cd /src
> tinygo run main.go

I get:

# net
../usr/include/netdb.h:617:23: unexpected token ILLEGAL
../usr/include/netdb.h:618:22: unexpected token ILLEGAL
../usr/include/netdb.h:624:23: unexpected token ILLEGAL
../usr/include/netdb.h:625:25: unexpected token ILLEGAL
../usr/include/netdb.h:617:23: unexpected token ILLEGAL
../usr/include/netdb.h:618:22: unexpected token ILLEGAL
../usr/include/netdb.h:624:23: unexpected token ILLEGAL
../usr/include/netdb.h:625:25: unexpected token ILLEGAL
../usr/include/netdb.h:617:23: unexpected token ILLEGAL
../usr/include/netdb.h:618:22: unexpected token ILLEGAL
../usr/include/netdb.h:624:23: unexpected token ILLEGAL
../usr/include/netdb.h:625:25: unexpected token ILLEGAL

I get the same error, when I have included the bluetooth package (https://github.com/tinygo-org/bluetooth).

So I can not compile for linux with the bluetooth package.

@deadprogram deadprogram added the enhancement New feature or request label Jan 30, 2021
@rzr
Copy link

rzr commented Mar 9, 2021

net API is not yet supported according to:

https://tinygo.org/lang-support/stdlib/#net

# net
/home/ron/.gvm/gos/go1.15/src/net/parse.go:80:12: st.ModTime undefined (type os.FileInfo has no field or method ModTime)

Relate-to: rzr/webthing-go#4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants