private-octopus / fuzi_q

Over the net fuzzing of QUIC servers or clients.
MIT License
19 stars 4 forks source link

Error while building fuzi_q #25

Closed Karthikdasari0423 closed 10 months ago

Karthikdasari0423 commented 10 months ago

i am getting below error when i tried to build fuzi_q

root@ubuntu:~/fuzi_q# make
[  7%] Building C object CMakeFiles/fuzy_q_core.dir/lib/fuzzer.c.o
[ 15%] Building C object CMakeFiles/fuzy_q_core.dir/lib/fuzzer_frames.c.o
[ 23%] Building C object CMakeFiles/fuzy_q_core.dir/lib/client.c.o
/root/fuzi_q/lib/client.c: In function ‘fuzi_q_start_connection’:
/root/fuzi_q/lib/client.c:96:27: error: passing argument 5 of ‘picoquic_demo_client_get_alpn_and_version_from_tickets’ makes pointer from integer without a cast [-Werror=int-conversion]
   96 |         proposed_version, current_time, &ticket_alpn, &ticket_version) == 0) {
      |                           ^~~~~~~~~~~~
      |                           |
      |                           uint64_t {aka long unsigned int}
In file included from /root/fuzi_q/include/fuzi_q.h:30,
                 from /root/fuzi_q/lib/client.c:31:
/root/picoquic/picohttp/democlient.h:103:18: note: expected ‘const char **’ but argument is of type ‘uint64_t’ {aka ‘long unsigned int’}
  103 |     char const** ticket_alpn, uint32_t* ticket_version);
      |     ~~~~~~~~~~~~~^~~~~~~~~~~
/root/fuzi_q/lib/client.c:96:41: error: passing argument 6 of ‘picoquic_demo_client_get_alpn_and_version_from_tickets’ from incompatible pointer type [-Werror=incompatible-pointer-types]
   96 |         proposed_version, current_time, &ticket_alpn, &ticket_version) == 0) {
      |                                         ^~~~~~~~~~~~
      |                                         |
      |                                         const char **
In file included from /root/fuzi_q/include/fuzi_q.h:30,
                 from /root/fuzi_q/lib/client.c:31:
/root/picoquic/picohttp/democlient.h:103:41: note: expected ‘uint32_t *’ {aka ‘unsigned int *’} but argument is of type ‘const char **’
  103 |     char const** ticket_alpn, uint32_t* ticket_version);
      |                               ~~~~~~~~~~^~~~~~~~~~~~~~
/root/fuzi_q/lib/client.c:95:9: error: too many arguments to function ‘picoquic_demo_client_get_alpn_and_version_from_tickets’
   95 |     if (picoquic_demo_client_get_alpn_and_version_from_tickets(fuzi_q_ctx->quic, PICOQUIC_TEST_SNI, alpn,
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /root/fuzi_q/include/fuzi_q.h:30,
                 from /root/fuzi_q/lib/client.c:31:
/root/picoquic/picohttp/democlient.h:101:5: note: declared here
  101 | int picoquic_demo_client_get_alpn_and_version_from_tickets(picoquic_quic_t* quic,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [CMakeFiles/fuzy_q_core.dir/build.make:104: CMakeFiles/fuzy_q_core.dir/lib/client.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:90: CMakeFiles/fuzy_q_core.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
root@ubuntu:~/fuzi_q#

am i missing anything here? @huitema

huitema commented 10 months ago

Have you tried compiling the latest version of picoquic before compiling fuzi-q?

Karthikdasari0423 commented 10 months ago

yes,i tried latest version of picoquic only

Karthikdasari0423 commented 10 months ago

picoquic git log

commit 510e031eda698e6d3ade377226dfea3644be771b (HEAD -> master, origin/master, origin/HEAD)
Merge: 349fb2ec 0d0f31c5
Author: Christian Huitema <huitema@huitema.net>
Date:   Thu Dec 28 22:25:58 2023 -0800

    Merge pull request #1605 from private-octopus/pathch-tie-issues

    Fix time issues

picotls git log

commit df13092f6c5c2f08c5227e096a1590603229dfc8 (HEAD -> master, origin/master, origin/HEAD)
Merge: 020bca0 6ea0811
Author: Kazuho Oku <kazuhooku@gmail.com>
Date:   Mon Dec 4 10:45:37 2023 +0900

    Merge pull request #497 from kazuho/pull/497

    Replace the TLS_AEGIS_256_SHA384 ciphersuite with TLS_AEGIS_256_SHA512

fuzi_q git log

root@ubuntu:~/fuzi_q# make
[  7%] Building C object CMakeFiles/fuzy_q_core.dir/lib/client.c.o
/root/fuzi_q/lib/client.c: In function ‘fuzi_q_start_connection’:
/root/fuzi_q/lib/client.c:96:27: error: passing argument 5 of ‘picoquic_demo_client_get_alpn_and_version_from_tickets’ makes pointer from integer without a cast [-Werror=int-conversion]
   96 |         proposed_version, current_time, &ticket_alpn, &ticket_version) == 0) {
      |                           ^~~~~~~~~~~~
      |                           |
      |                           uint64_t {aka long unsigned int}
In file included from /root/fuzi_q/include/fuzi_q.h:30,
                 from /root/fuzi_q/lib/client.c:31:
/root/picoquic/picohttp/democlient.h:103:18: note: expected ‘const char **’ but argument is of type ‘uint64_t’ {aka ‘long unsigned int’}
  103 |     char const** ticket_alpn, uint32_t* ticket_version);
      |     ~~~~~~~~~~~~~^~~~~~~~~~~
/root/fuzi_q/lib/client.c:96:41: error: passing argument 6 of ‘picoquic_demo_client_get_alpn_and_version_from_tickets’ from incompatible pointer type [-Werror=incompatible-pointer-types]
   96 |         proposed_version, current_time, &ticket_alpn, &ticket_version) == 0) {
      |                                         ^~~~~~~~~~~~
      |                                         |
      |                                         const char **
In file included from /root/fuzi_q/include/fuzi_q.h:30,
                 from /root/fuzi_q/lib/client.c:31:
/root/picoquic/picohttp/democlient.h:103:41: note: expected ‘uint32_t *’ {aka ‘unsigned int *’} but argument is of type ‘const char **’
  103 |     char const** ticket_alpn, uint32_t* ticket_version);
      |                               ~~~~~~~~~~^~~~~~~~~~~~~~
/root/fuzi_q/lib/client.c:95:9: error: too many arguments to function ‘picoquic_demo_client_get_alpn_and_version_from_tickets’
   95 |     if (picoquic_demo_client_get_alpn_and_version_from_tickets(fuzi_q_ctx->quic, PICOQUIC_TEST_SNI, alpn,
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /root/fuzi_q/include/fuzi_q.h:30,
                 from /root/fuzi_q/lib/client.c:31:
/root/picoquic/picohttp/democlient.h:101:5: note: declared here
  101 | int picoquic_demo_client_get_alpn_and_version_from_tickets(picoquic_quic_t* quic,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [CMakeFiles/fuzy_q_core.dir/build.make:104: CMakeFiles/fuzy_q_core.dir/lib/client.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:90: CMakeFiles/fuzy_q_core.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
root@ubuntu:~/fuzi_q#
root@ubuntu:~/fuzi_q#
root@ubuntu:~/fuzi_q#
root@ubuntu:~/fuzi_q#
root@ubuntu:~/fuzi_q#
root@ubuntu:~/fuzi_q# git log
commit f7da9ea94c336c2f6b51d4f9762f532b7018fa54 (HEAD -> main, origin/main, origin/HEAD)
Merge: 852f444 6a5ca08
Author: Christian Huitema <huitema@huitema.net>
Date:   Fri Sep 22 20:18:36 2023 -0700

    Merge pull request #21 from private-octopus/weird-assembly

    Add minicrypto library in FindPTLS

commit 6a5ca08893f4e680a1581f7ad74b1b0aabe3311a (origin/weird-assembly)
Author: Christian Huitema <christianhuitema@Christians-iMac.local>
Date:   Fri Sep 22 20:06:23 2023 -0700

    Fix call to sha256 (lower case)

commit e9316dbc9bf53a0c3b1aa789ba6c48e449632448
Author: Christian Huitema <christianhuitema@Christians-iMac.local>
Date:   Fri Sep 22 18:15:08 2023 -0700

    always use the latest version of picotls
Karthikdasari0423 commented 10 months ago

this is the commit having issues https://github.com/private-octopus/picoquic/commit/f4e2b8ef2c870441b5d47414bf3f7d9055c8df61

root@ubuntu:~/picoquic# git log
commit f4e2b8ef2c870441b5d47414bf3f7d9055c8df61 (HEAD)
Author: Christian Huitema <huitema@huitema.net>
Date:   Wed Dec 27 16:35:39 2023 -0800

    Ticket store uses tls time

commit 349fb2ecd1a5392436c5fb2dc2b760e5b224332d (origin/improve-coverage)
Merge: a5acc71f ae367ec2
Author: Christian Huitema <huitema@huitema.net>
Date:   Thu Dec 21 22:04:35 2023 -0800

    Merge pull request #1602 from private-octopus/improve-coverage

    Improve coverage of the text logger functions

commit ae367ec23f53a4d273f319081da3553763d59f48
Author: Christian Huitema <huitema@huitema.net>
Date:   Thu Dec 21 21:30:20 2023 -0800

    Fix integer overflow with new token

commit d16a068a90a551c0465ad37cafc2e02a234551e5
Author: Christian Huitema <huitema@huitema.net>
Date:   Thu Dec 21 20:54:33 2023 -0800

    Work around the optimizer

commit a2770ce34fe760a8263d58532067831db89e1a79
Author: Christian Huitema <huitema@huitema.net>
Date:   Thu Dec 21 20:28:33 2023 -0800

    Add zero-effect mbdedtls load.

commit 339fc522b2fa38b79675ecd4b40d85566a436049
Author: Christian Huitema <huitema@huitema.net>
Date:   Thu Dec 21 20:17:52 2023 -0800

    Fix of binlog and textlog ref

commit 5520ec4e4f0e5fa066503f36c80bf153a41320b4
Author: Christian Huitema <huitema@huitema.net>
Date:   Thu Dec 21 18:32:33 2023 -0800
root@ubuntu:~/picoquic#
root@ubuntu:~/picoquic# cd -
/root/fuzi_q
root@ubuntu:~/fuzi_q# make
[  7%] Building C object CMakeFiles/fuzy_q_core.dir/lib/client.c.o
/root/fuzi_q/lib/client.c: In function ‘fuzi_q_start_connection’:
/root/fuzi_q/lib/client.c:96:27: error: passing argument 5 of ‘picoquic_demo_client_get_alpn_and_version_from_tickets’ makes pointer from integer without a cast [-Werror=int-conversion]
   96 |         proposed_version, current_time, &ticket_alpn, &ticket_version) == 0) {
      |                           ^~~~~~~~~~~~
      |                           |
      |                           uint64_t {aka long unsigned int}
In file included from /root/fuzi_q/include/fuzi_q.h:30,
                 from /root/fuzi_q/lib/client.c:31:
/root/picoquic/picohttp/democlient.h:103:18: note: expected ‘const char **’ but argument is of type ‘uint64_t’ {aka ‘long unsigned int’}
  103 |     char const** ticket_alpn, uint32_t* ticket_version);
      |     ~~~~~~~~~~~~~^~~~~~~~~~~
/root/fuzi_q/lib/client.c:96:41: error: passing argument 6 of ‘picoquic_demo_client_get_alpn_and_version_from_tickets’ from incompatible pointer type [-Werror=incompatible-pointer-types]
   96 |         proposed_version, current_time, &ticket_alpn, &ticket_version) == 0) {
      |                                         ^~~~~~~~~~~~
      |                                         |
      |                                         const char **
In file included from /root/fuzi_q/include/fuzi_q.h:30,
                 from /root/fuzi_q/lib/client.c:31:
/root/picoquic/picohttp/democlient.h:103:41: note: expected ‘uint32_t *’ {aka ‘unsigned int *’} but argument is of type ‘const char **’
  103 |     char const** ticket_alpn, uint32_t* ticket_version);
      |                               ~~~~~~~~~~^~~~~~~~~~~~~~
/root/fuzi_q/lib/client.c:95:9: error: too many arguments to function ‘picoquic_demo_client_get_alpn_and_version_from_tickets’
   95 |     if (picoquic_demo_client_get_alpn_and_version_from_tickets(fuzi_q_ctx->quic, PICOQUIC_TEST_SNI, alpn,
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /root/fuzi_q/include/fuzi_q.h:30,
                 from /root/fuzi_q/lib/client.c:31:
/root/picoquic/picohttp/democlient.h:101:5: note: declared here
  101 | int picoquic_demo_client_get_alpn_and_version_from_tickets(picoquic_quic_t* quic,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [CMakeFiles/fuzy_q_core.dir/build.make:104: CMakeFiles/fuzy_q_core.dir/lib/client.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:90: CMakeFiles/fuzy_q_core.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
root@ubuntu:~/fuzi_q#

last working commit https://github.com/private-octopus/picoquic/commit/349fb2ecd1a5392436c5fb2dc2b760e5b224332d

root@ubuntu:~/picoquic# git log
commit 349fb2ecd1a5392436c5fb2dc2b760e5b224332d (HEAD, origin/improve-coverage)
Merge: a5acc71f ae367ec2
Author: Christian Huitema <huitema@huitema.net>
Date:   Thu Dec 21 22:04:35 2023 -0800

    Merge pull request #1602 from private-octopus/improve-coverage

    Improve coverage of the text logger functions

commit ae367ec23f53a4d273f319081da3553763d59f48
Author: Christian Huitema <huitema@huitema.net>
Date:   Thu Dec 21 21:30:20 2023 -0800

    Fix integer overflow with new token

commit d16a068a90a551c0465ad37cafc2e02a234551e5
Author: Christian Huitema <huitema@huitema.net>
Date:   Thu Dec 21 20:54:33 2023 -0800

    Work around the optimizer

commit a2770ce34fe760a8263d58532067831db89e1a79
Author: Christian Huitema <huitema@huitema.net>
Date:   Thu Dec 21 20:28:33 2023 -0800

    Add zero-effect mbdedtls load.

commit 339fc522b2fa38b79675ecd4b40d85566a436049
Author: Christian Huitema <huitema@huitema.net>
Date:   Thu Dec 21 20:17:52 2023 -0800

    Fix of binlog and textlog ref

commit 5520ec4e4f0e5fa066503f36c80bf153a41320b4
Author: Christian Huitema <huitema@huitema.net>
Date:   Thu Dec 21 18:32:33 2023 -0800

    Fix binlog after changes in tests

commit 67ec005773ce5806e75add1b00d9538561a22220
Author: Christian Huitema <huitema@huitema.net>
Date:   Thu Dec 21 18:15:40 2023 -0800
root@ubuntu:~/picoquic#
root@ubuntu:~/picoquic#
root@ubuntu:~/picoquic#
root@ubuntu:~/picoquic# cd -
/root/fuzi_q
root@ubuntu:~/fuzi_q# cmake .
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

-- Picoquic/include: /root/picoquic/picoquic;/root/picoquic/loglib;/root/picoquic/picohttp
-- Picohttp library: /root/picoquic/libpicoquic-core.a;/root/picoquic/libpicoquic-log.a;/root/picoquic/libpicohttp-core.a
-- picotls/include: /root/picotls/include
-- picotls libraries: /root/picotls/libpicotls-core.a;/root/picotls/libpicotls-openssl.a;/root/picotls/libpicotls-fusion.a;/root/picotls/libpicotls-minicrypto.a
-- root:
-- OpenSSL_VERSION: 3.0.2
-- OpenSSL_INCLUDE_DIR: /usr/include
-- OpenSSL_LIBRARIES: /usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: /root/fuzi_q
root@ubuntu:~/fuzi_q# make
[  7%] Building C object CMakeFiles/fuzy_q_core.dir/lib/fuzzer.c.o
[ 15%] Building C object CMakeFiles/fuzy_q_core.dir/lib/fuzzer_frames.c.o
[ 23%] Building C object CMakeFiles/fuzy_q_core.dir/lib/client.c.o
[ 30%] Building C object CMakeFiles/fuzy_q_core.dir/lib/server.c.o
[ 38%] Building C object CMakeFiles/fuzy_q_core.dir/lib/context.c.o
[ 46%] Linking C static library libfuzy_q_core.a
[ 46%] Built target fuzy_q_core
[ 53%] Building C object CMakeFiles/fuzi_q_tests.dir/tests/basic_test.c.o
[ 61%] Building C object CMakeFiles/fuzi_q_tests.dir/tests/context_tests.c.o
[ 69%] Linking C static library libfuzi_q_tests.a
[ 69%] Built target fuzi_q_tests
[ 76%] Building C object CMakeFiles/fuzi_q.dir/src/fuzi_q.c.o
[ 84%] Linking C executable fuzi_q
[ 84%] Built target fuzi_q
[ 92%] Linking C executable fuzi_qt
[100%] Built target fuzi_qt
root@ubuntu:~/fuzi_q#
huitema commented 10 months ago

Sorry about that. I should have updated fuzi-q after updating picoquic. Fixed in PR #28

Karthikdasari0423 commented 10 months ago

able to complie now

root@ubuntu:~/fuzi_q# make
[  7%] Building C object CMakeFiles/fuzy_q_core.dir/lib/fuzzer.c.o
[ 15%] Building C object CMakeFiles/fuzy_q_core.dir/lib/fuzzer_frames.c.o
[ 23%] Building C object CMakeFiles/fuzy_q_core.dir/lib/client.c.o
[ 30%] Building C object CMakeFiles/fuzy_q_core.dir/lib/server.c.o
[ 38%] Building C object CMakeFiles/fuzy_q_core.dir/lib/context.c.o
[ 46%] Linking C static library libfuzy_q_core.a
[ 46%] Built target fuzy_q_core
[ 53%] Building C object CMakeFiles/fuzi_q_tests.dir/tests/basic_test.c.o
[ 61%] Building C object CMakeFiles/fuzi_q_tests.dir/tests/context_tests.c.o
[ 69%] Linking C static library libfuzi_q_tests.a
[ 69%] Built target fuzi_q_tests
[ 76%] Building C object CMakeFiles/fuzi_q.dir/src/fuzi_q.c.o
[ 84%] Linking C executable fuzi_q
[ 84%] Built target fuzi_q
[ 92%] Building C object CMakeFiles/fuzi_qt.dir/src/fuzi_qt.c.o
[100%] Linking C executable fuzi_qt
[100%] Built target fuzi_qt
root@ubuntu:~/fuzi_q#
root@ubuntu:~/fuzi_q# git log
commit 8c15c9ff179000afa5b6e218938c34d82525075e (HEAD -> main, origin/main, origin/HEAD)
Merge: f7da9ea db9fa44
Author: Christian Huitema <huitema@huitema.net>
Date:   Sat Dec 30 12:51:33 2023 -0800

    Merge pull request #28 from private-octopus/align-picoquic-december-2023

    Fix call to ticket retrieval

Thank you @huitema