Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by gbr-app-1.alpinelinux.org (Postfix) with ESMTPS id 4B46E226FCE for <~alpine/devel@lists.alpinelinux.org>; Fri, 25 Oct 2024 22:42:31 +0000 (UTC) Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2fb5cdabac0so1234221fa.0 for <~alpine/devel@lists.alpinelinux.org>; Fri, 25 Oct 2024 15:42:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729896150; x=1730500950; darn=lists.alpinelinux.org; h=content-transfer-encoding:to:subject:message-id:date:from :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=YKDvmDdnj5hZ2FmVTc5cdyCmpYOW3ilGyV1qDHxpG5M=; b=OEXzMpkoTSPJECd1EjULa3EE2L5iQNj/8CP3oQVbws8/LUqWr9Q4XNQO33qTboQ/7u 8tYDKUmI8qoPV5K+EBw9fObVN8N4qKAngoqLsp1JiabhamJ6FSQrsSmCbPIzxrwx2UYP LseFxrvKchZAGgSIq6H3Gp5y3WkFwAzL4mZIkQl487ZC8oPm8i9XCHGP08NVkJcQ8vJi 436o2IMo7QIlLRHss1sy/fTR+biCdfs+fARVUUjhAYRTzJbgVxHypzPoxiLUUWCF49zN d9WTjuF9kFfb99mTIARbObwKdHHAdAQ8ycjN5W0grxYO/PRlSMxDemXiVd+oR8qGJuoG SCew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729896150; x=1730500950; h=content-transfer-encoding:to:subject:message-id:date:from :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YKDvmDdnj5hZ2FmVTc5cdyCmpYOW3ilGyV1qDHxpG5M=; b=e9wr8kYJw1gPxbToAcIbZNVbWlBczKDlvjW18Qe1+uPeOqwajcF9+2OQzjoiRWnkVK dvCf+UX/S1J71UkqaXqj7V84J3NP+OZ7hlmzzZOtmM1KBvxx6znSZEKSuBlHAyMly+0v j3fGoXtwIPp7gLE70smt4vnGzcXh9tcphEAHkCAFrlkLj3FYgQ7Q1AwqIpwvkKYb2/L4 SPvAIDzUaGtm++Q56mu7WsAUw1VLLKdW/s5fIWqzEGWITEY8MfZHsNtOLOJplCf7cFmT fgMFtI/pqbICFxHIcqMNVPdqXV1YKyPu+r0TBmJ3cl8SFLGztdjA4Y76LYogLSJlH4hH idZA== X-Gm-Message-State: AOJu0YyCLDe/l5yoXWQ96Ap3X65KP7cJ5pswZa5KUa31XipbSB5N1P+T iuVHnyPYOepWkFs2XVHSyH1zbQHZYJwbpc7/B/yJWEwpw53eholtLty8OvMAZwNLu7uQsgy3Nk7 Chy3xCf4S4cOdI9ag1pNq0eNTfSmRrwi+G/E= X-Google-Smtp-Source: AGHT+IGsxC9Z5haAGgertAZIXinUINyYZPqrZOh9xUy9ZI8r71pFl9CTbM16zW5zNkAceBbLOCgsQAVOIjfWs7f0DLA= X-Received: by 2002:a2e:be1f:0:b0:2fb:593c:2bd5 with SMTP id 38308e7fff4ca-2fcbe081705mr1091081fa.11.1729896149905; Fri, 25 Oct 2024 15:42:29 -0700 (PDT) MIME-Version: 1.0 From: Samuel Marks Date: Fri, 25 Oct 2024 17:42:18 -0500 Message-ID: Subject: Postgres dependent Rust project doesn't link | ld: fe-secure-common.c:(.text+0x320): undefined reference to `pg_strerror_r' To: ~alpine/devel@lists.alpinelinux.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Dockerfile available in my project, just build it `docker build .` to replicate issue. https://github.com/SamuelMarks/serve-actix-diesel-auth-scaffold Taking a close look at the log, and it seems that I need musl-dev libpq-dev postgresql16-dev. So I've added these dependencies. Errors remain. ________________________________ Log snippet: Compiling rust-actix-diesel-auth-scaffold v0.0.1 (https://github.com/SamuelMarks/rust-actix-diesel-auth-scaffold#3a16ec03) Compiling serve-actix-diesel-auth-scaffold v0.0.1 (/src) error: linking with `cc` failed: exit status: 1 | =3D note: LC_ALL=3D"C" PATH=3D"/usr/local/rustup/toolchains/nightly-aarch64-unknown-linux-musl/lib= /rustlib/aarch64-unknown-linux-musl/bin [=E2=80=A6] fe-secure-common.c:(.text+0xf0): undefined reference to `pg_strcasecmp' /usr/lib/gcc/aarch64-alpine-linux-musl/13.2.1/../../../../aarch6= 4-alpine-linux-musl/bin/ld: fe-secure-common.c:(.text+0x168): undefined reference to `pg_strcasecmp' /usr/lib/gcc/aarch64-alpine-linux-musl/13.2.1/../../../../aarch6= 4-alpine-linux-musl/bin/ld: /usr/lib/libpq.a(fe-secure-common.o): in function `pq_verify_peer_name_matches_certificate_ip': fe-secure-common.c:(.text+0x250): undefined reference to `pg_inet_net_ntop' /usr/lib/gcc/aarch64-alpine-linux-musl/13.2.1/../../../../aarch6= 4-alpine-linux-musl/bin/ld: fe-secure-common.c:(.text+0x320): undefined reference to `pg_strerror_r' collect2: error: ld returned 1 exit status ________________________________ What am I doing wrong? - Does the linker need explicit paths setup ahead of time? - Is it a Rust issue, are the linker dependencies not transitively exposed? Thanks for any suggestions, Samuel Marks Charity | consultancy | open-source | LinkedIn