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

Having little trouble compiling ps2client. #8

Closed
7dog123 opened this issue Jul 25, 2020 · 3 comments
Closed

Having little trouble compiling ps2client. #8

7dog123 opened this issue Jul 25, 2020 · 3 comments

Comments

@7dog123
Copy link

7dog123 commented Jul 25, 2020

I'm trying to compile ps2client but hit a bit of a snag.

src/ps2link.c: In function 'ps2link_request_getstat': src/ps2link.c:632:12: warning: implicit declaration of function 'ps2link_response_getstat'; did you mean 'ps2link_request_getstat'? [-Wimplicit-function-declaration] return ps2link_response_getstat(ret, mode, 0, stats.st_size, ctime, atime, mtime, 0); ^~~~~~~~~~~~~~~~~~~~~~~~ ps2link_request_getstat

I'm using gcc version 8.3.0

@rickgaiser
Copy link
Member

Please share a little more output of the compiler. When I compile I get:

ps2client$ make clean all
rm -f obj/*.o bin/*client*
cc -std=gnu99 -Wall -pedantic -I/usr/include -I/usr/local/include -c src/network.c -o obj/network.o
cc -std=gnu99 -Wall -pedantic -I/usr/include -I/usr/local/include -c src/ps2link.c -o obj/ps2link.o
src/ps2link.c: In function ‘ps2link_connect’:
src/ps2link.c:50:44: warning: passing argument 1 to restrict-qualified parameter aliases with argument 4 [-Wrestrict]
   50 |   if (console_socket > 0) { pthread_create(&console_thread_id, NULL, ps2link_thread_console, (void *)&console_thread_id); }
      |                                            ^~~~~~~~~~~~~~~~~~                                ~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ps2link.c:56:44: warning: passing argument 1 to restrict-qualified parameter aliases with argument 4 [-Wrestrict]
   56 |   if (request_socket > 0) { pthread_create(&request_thread_id, NULL, ps2link_thread_request, (void *)&request_thread_id); }
      |                                            ^~~~~~~~~~~~~~~~~~                                ~~~~~~~~~~~~~~~~~~~~~~~~~~
cc -std=gnu99 -Wall -pedantic -I/usr/include -I/usr/local/include -c src/ps2netfs.c -o obj/ps2netfs.o
cc -std=gnu99 -Wall -pedantic -I/usr/include -I/usr/local/include -c src/utility.c -o obj/utility.o
cc -std=gnu99 -Wall -pedantic -I/usr/include -I/usr/local/include obj/network.o obj/ps2link.o obj/ps2netfs.o obj/utility.o src/fsclient.c -o bin/fsclient -lpthread
cc -std=gnu99 -Wall -pedantic -I/usr/include -I/usr/local/include obj/network.o obj/ps2link.o obj/ps2netfs.o obj/utility.o src/ps2client.c -o bin/ps2client -lpthread

My compiler is:

ps2client$ cc --version
cc (Ubuntu 9.3.0-10ubuntu2) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

The issue does seem valid, becouse ps2link_response_getstat is defined after it's used. But I don't get why my newer compiler would have no problem with it.

@7dog123
Copy link
Author

7dog123 commented Jul 25, 2020

Here's the full output

/ps2dev/build/ps2client$ make clean all
rm -f obj/*.o bin/*client*
cc -std=gnu99 -Wall -pedantic -I/usr/include -I/usr/local/include -c src/network.c -o obj/network.o
cc -std=gnu99 -Wall -pedantic -I/usr/include -I/usr/local/include -c src/ps2link.c -o obj/ps2link.o
src/ps2link.c: In function 'ps2link_connect':
src/ps2link.c:50:44: warning: passing argument 1 to restrict-qualified parameter aliases with argument 4 [-Wrestrict]
   if (console_socket > 0) { pthread_create(&console_thread_id, NULL, ps2link_thread_console, (void *)&console_thread_id); }
                                            ^~~~~~~~~~~~~~~~~~                                ~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ps2link.c:56:44: warning: passing argument 1 to restrict-qualified parameter aliases with argument 4 [-Wrestrict]
   if (request_socket > 0) { pthread_create(&request_thread_id, NULL, ps2link_thread_request, (void *)&request_thread_id); }
                                            ^~~~~~~~~~~~~~~~~~                                ~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ps2link.c: In function 'ps2link_request_getstat':
src/ps2link.c:632:12: warning: implicit declaration of function 'ps2link_response_getstat'; did you mean 'ps2link_request_getstat'? [-Wimplicit-function-declaration]
     return ps2link_response_getstat(ret, mode, 0, stats.st_size, ctime, atime, mtime, 0);
            ^~~~~~~~~~~~~~~~~~~~~~~~
            ps2link_request_getstat
cc -std=gnu99 -Wall -pedantic -I/usr/include -I/usr/local/include -c src/ps2netfs.c -o obj/ps2netfs.o
cc -std=gnu99 -Wall -pedantic -I/usr/include -I/usr/local/include -c src/utility.c -o obj/utility.o
cc -std=gnu99 -Wall -pedantic -I/usr/include -I/usr/local/include obj/network.o obj/ps2link.o obj/ps2netfs.o obj/utility.o src/fsclient.c -o bin/fsclient -lpthread
cc -std=gnu99 -Wall -pedantic -I/usr/include -I/usr/local/include obj/network.o obj/ps2link.o obj/ps2netfs.o obj/utility.o src/ps2client.c -o bin/ps2client -lpthread

@fjtrujy
Copy link
Member

fjtrujy commented Jul 25, 2020

It obviously generated the ps2client, it is just some warnings in the process.
Search the binary, most probably is in the bin folder inside of ps2client.
if you execute make install it will install it to the proper ps2dev/bin folder.

Closing issue.

@fjtrujy fjtrujy closed this as completed Jul 25, 2020
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

3 participants