$\begingroup$

It's not completely ridiculous

For simplicity's sake, I assumed you're making a bridge that's one lightyear long, has a cross-section of one square metre and plugged that into Wolfram Alpha. We're looking at roughly 9.461 quadrillion m3 ($ 9.461 * 10^{15} $ m3) of material which corresponds to a solid sphere with a radius of 131.2 km.

If we consider that the Death Star II had a diameter of 160km, I'd say what you're setting out to accomplish is not entirely without precedent.

You could for instance grab 15 Eunomia, turn it entirely into lalalaicanthearyouium and have enought material to build yourself a whole lightyear of interstellar bridge.

Won't it collapse under its own gravity?

Let's see. Imagine a bunch infinite amount of 1 metre wide lalalaicanthearyouium spheres lined up next to each other. We start by calculating the gravitational force the second sphere exerts on the first using Newton's law of gravity:

\begin{align} F_1 & = G\frac{m_1m_2}{r^2} \\ & = G\frac{m^2}{1^2} \\ \end{align}

For the third sphere's force on the first one we get:

$$ F_1 = Gm^2 $$

What we're getting here is an infinite sum, so let's write that out and see what it gets us.

\begin{align} F_t & = \sum_{r=1}^\infty G\frac{m^2}{r^2} \\ & = Gm^2\sum_{r=1}^\infty \frac{1}{r^2} \\ & = Gm^2\frac{\pi^2 }{6} \end{align}

This is great news, The gravitational pull of an infinite series of spheres lined up next to each other on the first sphere is equal to $\frac{\pi^2 }{6} \approx 1.645$ times the gravitational pull between the first two. Of course, a bridge is not actually a series of spheres, but this should not be a problem since this approximation work better when the two objects are further apart. at a few kilometres, there will hardly be a difference.

You can improve on this calculation by making the distance between the segments (except for the first one) variable, and scaling the mass with the distance between, so they still accurately represent slices of the bridge. And then take the limit of the distance going to 0:

$$ F_t = \lim_\limits{d \to 0} Gdm^2 \sum_r^\infty \frac{1}{(\frac{1}{2}+rd)^2} $$

Calculating this limit is left as an exercise to the reader.