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

Tribblix build error: no dprintf #11

Open
schmonz opened this issue Jul 12, 2021 · 8 comments
Open

Tribblix build error: no dprintf #11

schmonz opened this issue Jul 12, 2021 · 8 comments

Comments

@schmonz
Copy link

schmonz commented Jul 12, 2021

With "1.7" (at commit `329110310c71a08a942b4a36613b6db090df65f4``) on Tribblix m25:

gcc -O2 -D_FORTIFY_SOURCE=2 -I/opt/pkg/include -I/usr/include -std=c99 -pedantic -Wall -Wextra -D_XOPEN_SOURCE=700 -D_BSD_SOURCE -I/opt/pkg/include -I/usr/include  -c -o httppc.o httppc.c
httppc.c: In function 'main':
httppc.c:67:2: warning: implicit declaration of function 'dprintf'; did you mean 'vprintf'? [-Wimplicit-function-declaration]
  dprintf(WRITE_FD, "CONNECT %s:%s HTTP/1.1\r\n", host, port);
  ^~~~~~~
  vprintf
gcc -O2 -D_FORTIFY_SOURCE=2 -I/opt/pkg/include -I/usr/include -std=c99 -pedantic -Wall -Wextra -D_XOPEN_SOURCE=700 -D_BSD_SOURCE -I/opt/pkg/include -I/usr/include  -c -o http_parser.o http_parser.c
gcc -L/opt/pkg/gcc7/lib/gcc/x86_64-sun-solaris2.11/7.5.0 -Wl,-R/opt/pkg/gcc7/lib/gcc/x86_64-sun-solaris2.11/7.5.0 -L/opt/pkg/lib -Wl,-R/opt/pkg/lib -L/usr/lib/amd64 -Wl,-R/usr/lib/amd64 -o httppc httppc.o http_parser.o
Undefined                       first referenced
 symbol                             in file
dprintf                             httppc.o
ld: fatal: symbol referencing errors. No output written to httppc
collect2: error: ld returned 1 exit status

Not sure whether you'd prefer to include a fallback definition for dprintf(), or avoid its use, or decide this isn't worth fixing. (FWIW, I'm eager to take advantage of these tools as soon as they're building and running well on the platforms where I'd use them.)

@younix
Copy link
Owner

younix commented Jul 19, 2021

Which libc do you use?

@schmonz
Copy link
Author

schmonz commented Jul 21, 2021

I don’t know! Tribblix is an Illumos so I guess it’s ultimately Solaris-derived.

@schmonz
Copy link
Author

schmonz commented Oct 18, 2021

Happy to provide SSH access to a Tribblix VM, if that'd help.

@younix
Copy link
Owner

younix commented Nov 8, 2021

I implemented a dprintf() version in httppc.
Can you test this, on you plattform and give me some feedback?

Thanks!

@schmonz
Copy link
Author

schmonz commented Nov 9, 2021

It gets httppc building. (httpc needs the same.) What would be a good way to test?

@younix
Copy link
Owner

younix commented Nov 9, 2021

Also, Implemented for httpc. Now, you can use httppc and httpc in a row for testing.

Thanks for you help, to improve this tools.

@schmonz
Copy link
Author

schmonz commented Nov 9, 2021

I haven't used these tools yet. Should make test be a sufficient exercise? If so, I'll focus on getting the tests running. If not, an example command line would be handy.

@schmonz
Copy link
Author

schmonz commented Nov 26, 2021

I'm seeing make test hang here, on several non-OpenBSD platforms:

1..32
ok 1 - plain connection server -> client
ok 2 - environment variable: "^TCPREMOTEIP=127.0.0.1$"
ok 3 - environment variable: "^TCPREMOTEHOST=localhost$"
ok 4 - environment variable: "^TCPREMOTEPORT=47258$"
ok 5 - environment variable: "^TCPLOCALIP=127.0.0.1$"
ok 6 - environment variable: "^TCPLOCALHOST=localhost$"
ok 7 - environment variable: "^TCPLOCALPORT=60013$"
ok 8 - environment variable: "^PROTO=TCP$"
ok 9 - plain connection client -> server
ok 10 - environment variable: "^TCPREMOTEIP=127.0.0.1$"
ok 11 - environment variable: "^TCPREMOTEHOST=localhost$"
ok 12 - environment variable: "^TCPREMOTEPORT=55035$"
ok 13 - environment variable: "^TCPLOCALIP=127.0.0.1$"
ok 14 - environment variable: "^TCPLOCALHOST=localhost$"
ok 15 - environment variable: "^TCPLOCALPORT=45014$"
ok 16 - environment variable: "^PROTO=TCP$"

I'm linking with libretls and running the tests under @ibara's portable oksh. Is this a combination we expect and/or want to work? How can I provide more details?

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

No branches or pull requests

2 participants