Compilation Issues Encountered on Linux Ubuntu 16 #2004
Replies: 3 comments
-
|
Please use code blocks to improve the readability of your issue, see https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks You should update your system, Ubuntu 16.04 and OpenSSL 1.1.1 are end-of-life. @huitema IMO the issue should be moved to discussions. |
Beta Was this translation helpful? Give feedback.
-
|
Moving to discussion. This is a request for information, not an issue with the picoquic code. |
Beta Was this translation helpful? Give feedback.
-
|
@qq2524651524-dnswjd, the way you are building your "make" file is a bit unconventional. Picoquic uses 'cmake' to create the make file. Maybe you should too? Both picoquic and picotls produce libraries: libpicoquic-http.a, libpicoquic-core.a, libpicoquic-log.a, lippicotls-openssl.a, libpicotls-minicrypto.a. You should have your makefile load these libraries instead of loading individual object files. The error messages that you encounter happen when binary objects or libraries are loaded in the wrong order. This is much easier to solve if you are linking libraries. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
Thank you for taking the time to read my issue amidst your busy schedule.
My English is not very good, and this content has been translated by software. Please forgive me if there is any ambiguity.
I am a beginner in programming, currently working on a school research project focused on multipath transmission in satellite environments. In the second half of 2025, I learned to use the ion software to simulate satellite communications. Two weeks ago, I discovered that picoquic includes experiments related to satellites and multipath transmission, which sparked my interest. I have since been attempting to learn picoquic and integrate it into my existing experimental environment.
Due to my limited technical expertise, I collaborated with AI tools to generate simple C files for a server and client, and then tried to compile them using gcc. However, compilation errors occurred.
First, I wrote server.c and client.c, followed by a Makefile with the following content:
CC = gcc
CFLAGS = -I/root/packages/pico/picoquic/picoquic -I/root/packages/pico/picotls/include -g -O2
PICOQUIC_OBJS = /root/packages/pico/picoquic/CMakeFiles/picoquic-core.dir/picoquic/.o
PICOTLS_CORE_OBJS = /root/packages/pico/picotls/CMakeFiles/picotls-core.dir/lib/.o
PICOTLS_OPENSSL_OBJS = /root/packages/pico/picotls/CMakeFiles/picotls-openssl.dir/lib/*.o
SYS_LIBS = -lpthread -lm -ldl -lssl -lcrypto
all: server client
$(CC) $ (CFLAGS) -o server server.c $(PICOQUIC_OBJS) $ (PICOTLS_CORE_OBJS) $(PICOTLS_OPENSSL_OBJS) $ (SYS_LIBS)
$(CC) $ (CFLAGS) -o client client.c $(PICOQUIC_OBJS) $ (PICOTLS_CORE_OBJS) $(PICOTLS_OPENSSL_OBJS) $ (SYS_LIBS)
server: server.c
client: client.c
When running make in the file directory, the following errors appeared:
/root/packages/pico/picoquic/CMakeFiles/picoquic-core.dir/picoquic/ech.c.o: In function
picoquic_ech_parse_public_key': ech.c:(.text+0x12c9): undefined reference toptls_asn1_get_expected_type_and_length'ech.c:(.text+0x134b): undefined reference to
ptls_asn1_error_message' ech.c:(.text+0x1384): undefined reference toptls_asn1_get_expected_type_and_length'ech.c:(.text+0x13be): undefined reference to
ptls_asn1_get_expected_type_and_length' …… /root/packages/pico/picotls/lib/openssl.c:2182: undefined reference toHMAC_size'collect2: error: ld returned 1 exit status
Makefile:25: recipe for target 'server' failed
make: *** [server] Error 1
Software Environment
picoquic and picotls are installed in ~/packages/pico/
OpenSSL version: 1.1.1w
CMake version: 3.27.9
Core Questions:
Is there an issue with the paths I configured?
How can I compile and use the contents in picoquictest?
I apologize if my questions seem basic, but I am genuinely eager to learn and resolve these issues.
Thank you for your help!
Beta Was this translation helpful? Give feedback.
All reactions