!signal-v11:maunium.net

Mautrix-Signal Bridge

221 Members
Discussion about mautrix-signal | Latest release: v0.8.2 | https://github.com/mautrix/signal157 Servers

Load older messages


SenderMessageTime
20 Apr 2025
@lsolrac:matrix.orgSolrac joined the room.02:12:46
@vestibule:explodie.orgvestibule joined the room.03:22:51
@derin:cordoba.beru.coderin joined the room.03:41:32
@count0:matrix.skewed.deTiago Peixoto joined the room.06:19:28
@sean:ptrs.uksean joined the room.09:05:58
@wrongname:chat.app.wr0ng.namewr0ng.name joined the room.09:42:30
@kolaente:kolaente.deKonrad joined the room.10:55:53
@tlh:intothematrix.inTLH joined the room.12:29:28
@rda:phys.ethz.chrda joined the room.12:57:49
@valux:matrix.orgᴠᴀʟᴜx ⒨ joined the room.13:07:12
@malte:maltee.deMalte E joined the room.14:05:51
@chrichri:ween.dechrichri ⚡️ joined the room.14:32:49
@maxmati:memleak.plMateusz Nowotyński joined the room.14:38:44
@keea:chat.fuzzy.zoneKeea joined the room.17:34:27
@tim:schumacher.im0xAFFE joined the room.19:19:49
@oldie:matrix.klass.bizOldie joined the room.19:51:39
@svbito:5n4p.netsvbito joined the room.20:13:59
@doti:catboyindustries.codoti joined the room.20:29:42
21 Apr 2025
@jade:ellis.linkJade joined the room.09:20:32
@albertlarsan68:albertlarsan.frAlbert Larsan joined the room.09:23:55
@naga:matrix.naga.shnaga joined the room.10:38:24
@thedodger:abot.xyzthedodger joined the room.11:13:29
@r3pek:r3pek.orgr3pek joined the room.12:30:55
@mc:skynet.com.esmc joined the room.14:21:12
@lowrider_gsx:matrix.orggsx joined the room.14:55:11
@raspbeguy:gugod.frraspbeguy joined the room.17:24:10
@github:maunium.netGitHub [mautrix/signal] Dr-Deep opened issue #595: Compilation errors in pkg/libsignalgo due to CFixedBytes() type mismatch

When building the Go wrapper (pkg/libsignalgo), I encounter multiple errors like:

cannot use NewACIServiceID(aci).CFixedBytes() (value of pointer type cPNIType) 
       as *_Ctype_SignalServiceIdFixedWidthBinaryBytes in variable declaration

It appears that CFixedBytes() currently returns a *cPNIType, whereas the C functions expect a *_Ctype_SignalServiceIdFixedWidthBinaryBytes. This mismatch was introduced by a recent change in the libsignal bridge code.

Steps to Reproduce:

  1. Clone the repository and checkout the main branch (or tag v0.8.1).
    git clone https://github.com/mautrix/signal.git
    cd signal
    
  2. Initialize and update submodules:
    git submodule update --init --recursive
    
  3. Build the Rust bridge:
    cd rust/bridge
    cargo build --release
    
  4. Return to the project root and build the Go wrapper:
    cd ../../
    CGO_CFLAGS="-I/usr/local/include" CGO_LDFLAGS="-L/usr/local/lib" go build ./pkg/libsignalgo
    
  5. Observe the compilation errors as shown above.

Expected Behavior:
pkg/libsignalgo should compile successfully, with CFixedBytes() returning the correct pointer type (*C.SignalServiceIdFixedWidthBinaryBytes) so that the C FFI calls match their signatures.

Environment:

  • OS: HardenedBSD (FreeBSD fork)
  • Go: go1.20.4 freebsd/amd64
  • Rust: rustc 1.70.0
  • Submodule (libsignal) pinned at: efe13e9b363d2c115dba61b76e5e53bbfc2874bc (pre-breaking change)
  • Repo tag: v0.8.1 (Commit 03d675c)

Workaround:
Manually pinning the libsignal submodule to the pre-update commit (efe13e9b…) restores compatibility and allows the build to succeed.

Proposed Fix:

  1. Update CFixedBytes() in pkg/libsignalgo to explicitly return *C.SignalServiceIdFixedWidthBinaryBytes (for example, via an unsafe.Pointer cast).
  2. Alternatively, adjust the underlying C type definitions in the libsignal bridge so they remain compatible with the existing Go bindings.

Thank you for your help!

17:35:12
@philipp:familie-neumann.onlinePhilipp joined the room.17:49:38
@github:maunium.netGitHub [mautrix/signal] tulir commented on issue #595: Compilation errors in pkg/libsignalgo due to CFixedBytes() type mismatch:

There haven't been any breaking changes. efe13e9b is the last commit of upstream libsignal, so not sure how you figured it's "pre-breaking change"

The bridge just doesn't currently support using clang outside macOS. Support for that could perhaps be added using a custom build tag, or assuming that gcc is only used on linux (see serviceid_gcc.go)

Other notes:

  • Compiling the bridge with anything else than the pinned libsignal version is completely unsupported, so you should never change it yourself. The release notes also include the expected libsignal version for your convenience.
  • v0.8.1 is not the latest release. Old releases are completely unsupported.
  • Go 1.20 is EOL and can't be used to compile the bridge: https://endoflife.date/go
  • Rust 1.70 is quite old too, it's best to use the version that upstream libsignal has pinned https://github.com/signalapp/libsignal/blob/main/rust-toolchain
17:59:25
@elias:vogsphere.info@elias:vogsphere.info joined the room.18:24:49

Show newer messages


Back to Room ListRoom Version: 11