New around here? Register your SA Forums Account here!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
corona familiar
Aug 13, 2021

eschaton posted:

for example you could put a few different systems in a rack and then use them from different terminals sprinkled throughout your home

imagining an alternate reality where Apple makes an RJ45 dongle for the iPhone

Adbot
ADBOT LOVES YOU

infernal machines
Oct 11, 2012

we monitor many frequencies. we listen always. came a voice, out of the babel of tongues, speaking to us. it played us a mighty dub.

corona familiar posted:

imagining an alternate reality where Apple makes an RJ45 dongle for the iPhone

it's usb-c isn't it?

Cybernetic Vermin
Apr 18, 2005

i broadly assume that had apple not gone out of their way to disable it (for good security reasons) you could have plugged in a usb ethernet adapter into an iphone and it'd likely have just worked.

infernal machines
Oct 11, 2012

we monitor many frequencies. we listen always. came a voice, out of the babel of tongues, speaking to us. it played us a mighty dub.
i thought there actually were some supported chipsets, but maybe it's ipados only

i'm pretty sure i've seen ipad kiosk setups with wired ethernet

Shaggar
Apr 26, 2006

Cybernetic Vermin posted:

i broadly assume that had apple not gone out of their way to disable it (for good security reasons) you could have plugged in a usb ethernet adapter into an iphone and it'd likely have just worked.

what would the "good security reasons" be?

infernal machines
Oct 11, 2012

we monitor many frequencies. we listen always. came a voice, out of the babel of tongues, speaking to us. it played us a mighty dub.

Cybernetic Vermin
Apr 18, 2005

Shaggar posted:

what would the "good security reasons" be?

code surface area, so many old usb drivers that were written at a time when you wouldn't assume nefarious devices getting plugged in.

Cybernetic Vermin
Apr 18, 2005


ah, well, neat, there goes my assuming

corona familiar
Aug 13, 2021


new opportunities await you in the world of home terminals

eschaton
Mar 7, 2007

the knowledge knower. a wisdom imparter. irritatingly self-assertive. odorous.
Home LCARS when?

Progressive JPEG
Feb 19, 2003

time to set up that beowulf cluster you always wanted

BobHoward
Feb 13, 2012

The only thing white people deserve is a bullet to their empty skull

Cybernetic Vermin posted:

ah, well, neat, there goes my assuming

i suspect maybe the thing you were missing is that usb has a standardized device class spec for ethernet over usb, making generic drivers possible

in fact, after having just looked it up, it appears that there's four such standards, because gently caress you that's why. the two that apple supports are cdc-ecm and cdc-ncm. if your device implements one of those, it's plug and play on apple's platforms with no driver install. (also on linux too, i would expect)

shackleford
Sep 4, 2006

lmao today i learned about gcc 15's -fzero-init-padding-bits=unions and exactly which bits the gcc developers consider "union padding bits". make sure you got the biggest union member at the front of your union or gcc will try to bust your attempt to initialize a union lol

Jon Pod Van Damm
Apr 6, 2009

THE POSSESSION OF WEALTH IS IN AND OF ITSELF A SIGN OF POOR VIRTUE. AS SUCH:
1 NEVER TRUST ANY RICH PERSON.
2 NEVER HIRE ANY RICH PERSON.
BY RULE 1, IT IS APPROPRIATE TO PRESUME THAT ALL DEGREES AND CREDENTIALS HELD BY A WEALTHY PERSON ARE FRAUDULENT. THIS JUSTIFIES RULE 2--RULE 1 NEEDS NO JUSTIFIC



What's a good GNU+Linux distro for gaming, and only gaming?

psiox
Oct 15, 2001

Babylon 5 Street Team

Jon Pod Van Damm posted:

What's a good GNU+Linux distro for gaming, and only gaming?

bazzite

it's actually very good. basically what if fedora was steamos and extremely hands-off

FAT32 SHAMER
Aug 16, 2012



Nobara is also fantastic if you don’t want to deal with the universal blue image stuff that locks a bunch of stuff to read only. Nobara 41 just came out last week and has so far been wildly stable compared to the already wildly stable Nobara 40

psiox
Oct 15, 2001

Babylon 5 Street Team
so i actually used nobara before switching to bazzite and it was the kind of janky mess you'd expect from a distribution maintained by exactly one nerd. constant issues and needs for one-off janitoring.

then i switched to bazzite and had zero problems at all. if you want a reliable gaming appliance, just use bazzite

ryanrs
Jul 12, 2011

shackleford posted:

lmao today i learned about gcc 15's -fzero-init-padding-bits=unions and exactly which bits the gcc developers consider "union padding bits". make sure you got the biggest union member at the front of your union or gcc will try to bust your attempt to initialize a union lol

You can only specify an initializer for one member of a union (the first member, or you can specify which one with a designated initializer: .fart=420).

e: post your code because I don't understand what you are trying to do. if you want gcc to compare member sizes and pick the largest try -fsize-queen

ryanrs fucked around with this message at 08:34 on Jan 14, 2025

pseudorandom name
May 6, 2007

if you initialized a union, gcc used to zero all of the part of the union you didn't initialize; C23 specifies that an empty initializer must zero the entire union and doesn't require any other initializer to do so, so gcc doesn't anymore unless you pass the magic "keep existing code working" command line option because gently caress you go gently caress yourself you worthless little poo poo, we're living high and mighty in our ivory tower and are under no obligation to deliver a useful product to you peons

corona familiar
Aug 13, 2021

if you initialize a union and your compiler refuses to accept your code you can file a complaint with the national linker relations board

Kazinsal
Dec 13, 2011

linter plan!
clang needs braces
linter plan!
clang needs braces

eschaton
Mar 7, 2007

the knowledge knower. a wisdom imparter. irritatingly self-assertive. odorous.

shackleford posted:

lmao today i learned about gcc 15's -fzero-init-padding-bits=unions and exactly which bits the gcc developers consider "union padding bits". make sure you got the biggest union member at the front of your union or gcc will try to bust your attempt to initialize a union lol

“let’s take C and make it unusable for C’s primary use case (kernel development)”

spankmeister
Jun 15, 2008






ryanrs posted:

if you want gcc to compare member sizes and pick the largest try -fsize-queen

lmfao

Sapozhnik
Jan 2, 2005

Nap Ghost
i can't even tell if that compiler flag is a joke or not since that's exactly the sort of gross nerd poo poo that i would expect out of a bunch of open sores weirdos who have minimal to no adult supervision

Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'

corona familiar posted:

if you initialize a union and your compiler refuses to accept your code you can file a complaint with the national linker relations board

ExcessBLarg!
Aug 31, 2001

pseudorandom name posted:

if you initialized a union, gcc used to zero all of the part of the union you didn't initialize; C23 specifies that an empty initializer must zero the entire union and doesn't require any other initializer to do so, so gcc doesn't anymore unless you pass the magic "keep existing code working" command line option because gently caress you go gently caress yourself you worthless little poo poo, we're living high and mighty in our ivory tower and are under no obligation to deliver a useful product to you peons
Does this change in behavior apply if you use "-std=c17" or earlier?

It shouldn't affect statically allocated unions because those live in static (.data or .bss) segments, just auto allocations?

Not trying to minimize the significance of this, but I searched for the last code I wrote where I had to stack allocate a union whose members were of different sizes. I checked and apparently I did a "memset(&u, 0, sizeof(u))", maybe thinking I wasn't sure what GCC would do if I provided it with an initializer.

Edit: Why does GCC have both -std=c17 and -std=c18? Is there confusion what the spec name is?

Tankakern
Jul 25, 2007

corona familiar posted:

if you initialize a union and your compiler refuses to accept your code you can file a complaint with the national linker relations board

Lysidas
Jul 26, 2002

John Diefenbaker is a madman who thinks he's John Diefenbaker.
Pillbug

corona familiar posted:

if you initialize a union and your compiler refuses to accept your code you can file a complaint with the national linker relations board

Cybernetic Vermin
Apr 18, 2005

ExcessBLarg! posted:

Edit: Why does GCC have both -std=c17 and -std=c18? Is there confusion what the spec name is?

the standard was published in 2018, so the colloquial c17 is a bit weird

ExcessBLarg!
Aug 31, 2001

Cybernetic Vermin posted:

the standard was published in 2018, so the colloquial c17 is a bit weird
Oh I see, the value for __STDC_VERSION__ (201710L) differs from the year the standard was actually published (2018).

shackleford
Sep 4, 2006

the C23 standard, aka ISO/IEC 9899:2024, was published in october 2024

Progressive JPEG
Feb 19, 2003

i wonder if gcc still has a '-std=c++0x' flag

still lolling that they guessed the decade wrong

eschaton
Mar 7, 2007

the knowledge knower. a wisdom imparter. irritatingly self-assertive. odorous.

Progressive JPEG posted:

i wonder if gcc still has a '-std=c++0x' flag

still lolling that they guessed the decade wrong

I think both gcc and clang do, because software that built in the past should continue to build and removing those settings would prevent that

which is part of why some of the changes around things like how structs and unions work are so annoying, they’re changing the behavior by default and requiring added options to get the old behavior that some code (like, say, device drivers) may rely on

ExcessBLarg!
Aug 31, 2001

eschaton posted:

which is part of why some of the changes around things like how structs and unions work are so annoying, they’re changing the behavior by default and requiring added options to get the old behavior that some code (like, say, device drivers) may rely on
Well if the spec changes the default behavior (or just, specifies it whereas it was unspecified in the past) it makes sense to change that behavior when compiling under the new spec.

So does the -std flag preserve the old behavior or not?

pseudorandom name
May 6, 2007

ExcessBLarg! posted:

So does the -std flag preserve the old behavior or not?

I agree that this seems like something that gcc should document.

shackleford
Sep 4, 2006

ExcessBLarg! posted:

So does the -std flag preserve the old behavior or not?

afaict "gcc-15 -std=c23" (the default) and "gcc-15 -std=c17" both have the new behavior while "gcc-14 -std=c23" and "gcc-14 -std=c17" both have the old behavior. that makes sense if you're a compiler developer i guess because the old and new behaviors are both consistent with the C standard

looks like you gotta specifically specify -fzero-init-padding-bits=unions or -fzero-init-padding-bits=all if you want the old behavior, but only on gcc >= 15 because those are new flags

Beeftweeter
Jun 28, 2005

OFFICIAL #1 GNOME FAN
perhaps this belongs in the embedded linux thread but i can't find it. you're all already talking about compilers though so i guess it fits

i am trying to install curl_cffi on my router (a pretty ancient asus RT-AC88U running the "merlin" firmware and entware for openwrt packages). i was able to compile libffi without (much) trouble, but installing curl_cffi via pip always fails at the compilation stage (there are an absolute fuckton of ld errors, so i just copied the last few):

pre:
gcc -shared -Wl,--dynamic-linker=/opt/lib/ld-linux.so.3 -Wl,-rpath=/opt/lib -L/opt/usr/lib -L/opt/lib -fuse-ld=bfd -L/opt/lib -L/opt/lib -Wl,--dynamic-linker=/opt/lib/ld-linux.so.3 -Wl,-rpat
h=/opt/lib -L/opt/usr/lib -L/opt/lib -fuse-ld=bfd -L/opt/lib -L/opt/lib -Wl,-rpath=/opt/lib -Wl,--dynamic-linker=/opt/lib/ld-linux.so.3 -L/opt/lib, -lstdc++ -mfloat-abi=softfp -mfloat-abi=softfp -
mtune=cortex-a9 -mcpu=cortex-a9 -O2 -pipe -mtune=cortex-a9 -mfloat-abi=soft -mfloat-abi=softfp -mcpu=cortex-a9 build/temp.linux-armv7l-cpython-311/build/temp.linux-armv7l-cpython-311/curl_cffi._wr
apper.o build/temp.linux-armv7l-cpython-311/ffi/shim.o /opt/tmp/tmpp0dx35hr/libcurl-impersonate-chrome.a /opt/tmp/tmpp0dx35hr/libssl.a /opt/tmp/tmpp0dx35hr/libcrypto.a /opt/tmp/tmpp0dx35hr/libz.a 
/opt/tmp/tmpp0dx35hr/libzstd.a /opt/tmp/tmpp0dx35hr/libnghttp2.a /opt/tmp/tmpp0dx35hr/libbrotlidec.a /opt/tmp/tmpp0dx35hr/libbrotlienc.a /opt/tmp/tmpp0dx35hr/libbrotlicommon.a -L/opt/tmp/tmpp0dx35
hr -L/opt/lib -o build/lib.linux-armv7l-cpython-311/curl_cffi/_wrapper.abi3.so
      /opt/bin/ld.bfd: error: /opt/tmp/tmpp0dx35hr/libcurl-impersonate-chrome.a(libcurl_impersonate_chrome_la-easy.o) uses VFP register arguments, build/lib.linux-armv7l-cpython-311/curl_cffi/_wra
pper.abi3.so does not
…
/opt/bin/ld.bfd: failed to merge target specific data of file /opt/tmp/tmpp0dx35hr/libbrotlicommon.a(transform.c.o)
 /opt/bin/ld.bfd: error: /opt/tmp/tmpp0dx35hr/libbrotlicommon.a(dictionary.c.o) uses VFP register arguments, build/lib.linux armv7l-cpython-311/curl_cffi/_wrapper.abi3.so does not
 /opt/bin/ld.bfd: failed to merge target specific data of file /opt/tmp/tmpp0dx35hr/libbrotlicommon.a(dictionary.c.o)
   collect2: error: ld returned 1 exit status
      error: command '/opt/bin/gcc' failed with exit code 1
      [end of output]
  
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for curl_cffi
Failed to build curl_cffi
      /opt/bin/ld.bfd: error: /opt/tmp/tmpp0dx35hr/libbrotlicommon.a(dictionary.c.o) uses VFP register arguments, build/lib.linux-armv7l-cpython-311/curl_cffi/_wrapper.abi3.so does not
      /opt/bin/ld.bfd: failed to merge target specific data of file /opt/tmp/tmpp0dx35hr/libbrotlicommon.a(dictionary.c.o)
      collect2: error: ld returned 1 exit status
      error: command '/opt/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for curl_cffi
Failed to build curl_cffi
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (curl_cffi)
now, i think i know what that means: it's trying to build curl_cffi using hard floats while the other libraries use soft floats (VFP) — which makes sense because this specific soc does not have a fpu:

pre:
Processor	: ARMv7 Processor rev 0 (v7l)
processor	: 0
BogoMIPS	: 2798.38

processor	: 1
BogoMIPS	: 2798.38

Features	: swp half thumb fastmult edsp 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x3
CPU part	: 0xc09
CPU revision	: 0

Hardware	: Northstar Prototype
Revision	: 0000
Serial		: 0000000000000000
i already tried modifying the CFLAGS and LDFLAGS to include "-mtune=cortex-a9 -mfloat-abi=soft" and such, but no dice. i don't know much about installing (let alone compiling) python packages, is there any way to get it to use soft floats? i thought i did (see the gcc invocation on the first line), but, uh, it didn't work?

e: i also tried `pip install --no-binary :all: --compile curl_cffi`, which didn't work either (same problem). that's with

LDFLAGS="-Wl,-rpath=/opt/lib -Wl,--dynamic-linker=/opt/lib/ld-linux.so.3 -L/opt/lib, -lstdc++ -mtune=cortex-a9 -mfloat-abi=softfp"
CFLAGS="-O2 -pipe -mtune=cortex-a9 -mfloat-abi=softfp"

and pip seems to use them. so idk wtf is going on

Beeftweeter fucked around with this message at 18:25 on Jan 16, 2025

Tankakern
Jul 25, 2007

owned

MayOrMayNotBeACat
Jul 22, 2017


somebody please dissuade me from using COSMIC instead of my perfectly functional KDE desktop

the brain worms are insisting despite the pleas from the rational part of my brain

Adbot
ADBOT LOVES YOU

outhole surfer
Mar 18, 2003

gnome, but we rewrote it in rust

very compelling

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply