Confirmed this on 4 different Arch Linux systems that SDL will NOT build with Rust 1.64.0.
Also confirmed on 3 of those 4 Arch Linux systems that SDL WILL build with Rust 1.63.0... so rust strikes again. This reminds me of how DNS is always the culprit with networking issues, haha...
Below is the error experienced on Rust 1.64.0
Compiling socket2 v0.3.11
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
--> /home/triplefive/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.11/src/sockaddr.rs:156:9
|
156 | mem::transmute::<SocketAddrV4, sockaddr_in>(v4);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: source type: `SocketAddrV4` (48 bits)
= note: target type: `sockaddr_in` (128 bits)
For more information about this error, try `rustc --explain E0512`.
error: could not compile `socket2` due to previous error
warning: build failed, waiting for other jobs to finish...
/usr/bin/uic src/hushrequest.ui -o src/ui_hushrequest.hbuf
/usr/bin/uic src/mainwindow.ui -o src/ui_mainwindow.h
/usr/bin/uic src/migration.ui -o src/ui_migration.h
/usr/bin/uic src/recurringpayments.ui -o src/ui_recurringpayments.h
/usr/bin/uic src/seedrestore.ui -o src/ui_seedrestore.h
/usr/bin/uic src/sendHushTransactionChat.ui -o src/ui_sendHushTransactionChat.h
/usr/bin/uic src/settings.ui -o src/ui_settings.h
/usr/bin/uic src/about.ui -o src/ui_about.h
/usr/bin/uic src/confirm.ui -o src/ui_confirm.h
/usr/bin/uic src/privkey.ui -o src/ui_privkey.h
/usr/bin/uic src/verifyseed.ui -o src/ui_verifyseed.h
/usr/bin/uic src/startupencryption.ui -o src/ui_startupencryption.h
/usr/bin/uic src/viewalladdresses.ui -o src/ui_viewalladdresses.h
/usr/bin/uic src/connection.ui -o src/ui_connection.h
/usr/bin/uic src/addressbook.ui -o src/ui_addressbook.h
/usr/bin/uic src/memodialog.ui -o src/ui_memodialog.h
/usr/bin/uic src/mobileappconnector.ui -o src/ui_mobileappconnector.h
/usr/bin/uic src/createhushconfdialog.ui -o src/ui_createhushconfdialog.h
/usr/bin/uic src/recurringdialog.ui -o src/ui_recurringdialog.h
/usr/bin/uic src/requestContactDialog.ui -o src/ui_requestContactDialog.h
/usr/bin/uic src/newrecurring.ui -o src/ui_newrecurring.h
/usr/bin/uic src/requestdialog.ui -o src/ui_requestdialog.h
/usr/bin/uic src/removeencryption.ui -o src/ui_removeencryption.h
/usr/bin/uic src/recurringmultiple.ui -o src/ui_recurringmultiple.h
/usr/bin/uic src/chatbubbleme.ui -o src/ui_chatbubbleme.h
/usr/bin/uic src/chatbubblepartner.ui -o src/ui_chatbubblepartner.h
g++ -pipe -g -std=gnu++1y -Wall -Wextra -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQAPPLICATION_CLASS=QApplication -D_FORTIFY_SOURCE=2 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_WEBSOCKETS_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Isrc/3rdparty -Isrc -Isingleapplication -Ires -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtWebSockets -I/usr/include/qt/QtNetwork -I/usr/include/qt/QtCore -Ibin -Isrc -I/usr/lib/qt/mkspecs/linux-g++ -x c++-header -c src/precompiled.h -o bin/SilentDragonLite.gch/c++
In file included from /usr/include/c++/12.2.0/x86_64-pc-linux-gnu/bits/os_defines.h:39,
from /usr/include/c++/12.2.0/x86_64-pc-linux-gnu/bits/c++config.h:655,
from /usr/include/c++/12.2.0/iostream:38,
from src/precompiled.h:6:
/usr/include/features.h:412:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
412 | # warning _FORTIFY_SOURCE requires compiling with optimization (-O)
| ^~~~~~~
/usr/bin/rcc -name application application.qrc -o qrc_application.cpp
g++ -pipe -g -std=gnu++1y -Wall -Wextra -dM -E -o bin/moc_predefs.h /usr/lib/qt/mkspecs/features/data/dummy.cpp
/usr/bin/uic src/contactrequest.ui -o src/ui_contactrequest.h
g++ -c -include bin/SilentDragonLite -pipe -g -std=gnu++1y -Wall -Wextra -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQAPPLICATION_CLASS=QApplication -D_FORTIFY_SOURCE=2 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_WEBSOCKETS_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Isrc/3rdparty -Isrc -Isingleapplication -Ires -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtWebSockets -I/usr/include/qt/QtNetwork -I/usr/include/qt/QtCore -Ibin -Isrc -I/usr/lib/qt/mkspecs/linux-g++ -o bin/firsttimewizard.o src/firsttimewizard.cpp
make[1]: *** [Makefile:22: target/release/silentdragonlite.a] Error 101
make[1]: Leaving directory '/home/triplefive/dev/AUR/silentdragonlite/src/silentdragonlite/lib'
make: *** [Makefile:787: /home/triplefive/dev/AUR/silentdragonlite/src/silentdragonlite/lib/target/release/libsilentdragonlite.a] Error 2
make: *** Waiting for unfinished jobs....
src/firsttimewizard.cpp: In constructor ‘NewOrRestorePage::NewOrRestorePage(FirstTimeWizard*)’:
src/firsttimewizard.cpp:137:20: warning: unused variable ‘view’ [-Wunused-variable]
137 | QGraphicsView* view = new QGraphicsView(scene);
| ^~~~
^[[Fsrc/firsttimewizard.cpp: In member function ‘virtual bool NewSeedPage::validatePage()’:
src/firsttimewizard.cpp:621:1: warning: control reaches end of non-void function [-Wreturn-type]
621 | }
| ^
==> ERROR: A failure occurred in build().
Aborting...
After running rustc --explain E0512 we see the issue "Transmute with two differently sized types was attempted."
* Confirmed this on 4 different Arch Linux systems that SDL will NOT build with Rust 1.64.0.
* Also confirmed on 3 of those 4 Arch Linux systems that SDL WILL build with Rust 1.63.0... so rust strikes again. This reminds me of how DNS is always the culprit with networking issues, haha...
Below is the error experienced on Rust 1.64.0
```
Compiling socket2 v0.3.11
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
--> /home/triplefive/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.11/src/sockaddr.rs:156:9
|
156 | mem::transmute::<SocketAddrV4, sockaddr_in>(v4);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: source type: `SocketAddrV4` (48 bits)
= note: target type: `sockaddr_in` (128 bits)
For more information about this error, try `rustc --explain E0512`.
error: could not compile `socket2` due to previous error
warning: build failed, waiting for other jobs to finish...
/usr/bin/uic src/hushrequest.ui -o src/ui_hushrequest.hbuf
/usr/bin/uic src/mainwindow.ui -o src/ui_mainwindow.h
/usr/bin/uic src/migration.ui -o src/ui_migration.h
/usr/bin/uic src/recurringpayments.ui -o src/ui_recurringpayments.h
/usr/bin/uic src/seedrestore.ui -o src/ui_seedrestore.h
/usr/bin/uic src/sendHushTransactionChat.ui -o src/ui_sendHushTransactionChat.h
/usr/bin/uic src/settings.ui -o src/ui_settings.h
/usr/bin/uic src/about.ui -o src/ui_about.h
/usr/bin/uic src/confirm.ui -o src/ui_confirm.h
/usr/bin/uic src/privkey.ui -o src/ui_privkey.h
/usr/bin/uic src/verifyseed.ui -o src/ui_verifyseed.h
/usr/bin/uic src/startupencryption.ui -o src/ui_startupencryption.h
/usr/bin/uic src/viewalladdresses.ui -o src/ui_viewalladdresses.h
/usr/bin/uic src/connection.ui -o src/ui_connection.h
/usr/bin/uic src/addressbook.ui -o src/ui_addressbook.h
/usr/bin/uic src/memodialog.ui -o src/ui_memodialog.h
/usr/bin/uic src/mobileappconnector.ui -o src/ui_mobileappconnector.h
/usr/bin/uic src/createhushconfdialog.ui -o src/ui_createhushconfdialog.h
/usr/bin/uic src/recurringdialog.ui -o src/ui_recurringdialog.h
/usr/bin/uic src/requestContactDialog.ui -o src/ui_requestContactDialog.h
/usr/bin/uic src/newrecurring.ui -o src/ui_newrecurring.h
/usr/bin/uic src/requestdialog.ui -o src/ui_requestdialog.h
/usr/bin/uic src/removeencryption.ui -o src/ui_removeencryption.h
/usr/bin/uic src/recurringmultiple.ui -o src/ui_recurringmultiple.h
/usr/bin/uic src/chatbubbleme.ui -o src/ui_chatbubbleme.h
/usr/bin/uic src/chatbubblepartner.ui -o src/ui_chatbubblepartner.h
g++ -pipe -g -std=gnu++1y -Wall -Wextra -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQAPPLICATION_CLASS=QApplication -D_FORTIFY_SOURCE=2 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_WEBSOCKETS_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Isrc/3rdparty -Isrc -Isingleapplication -Ires -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtWebSockets -I/usr/include/qt/QtNetwork -I/usr/include/qt/QtCore -Ibin -Isrc -I/usr/lib/qt/mkspecs/linux-g++ -x c++-header -c src/precompiled.h -o bin/SilentDragonLite.gch/c++
In file included from /usr/include/c++/12.2.0/x86_64-pc-linux-gnu/bits/os_defines.h:39,
from /usr/include/c++/12.2.0/x86_64-pc-linux-gnu/bits/c++config.h:655,
from /usr/include/c++/12.2.0/iostream:38,
from src/precompiled.h:6:
/usr/include/features.h:412:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
412 | # warning _FORTIFY_SOURCE requires compiling with optimization (-O)
| ^~~~~~~
/usr/bin/rcc -name application application.qrc -o qrc_application.cpp
g++ -pipe -g -std=gnu++1y -Wall -Wextra -dM -E -o bin/moc_predefs.h /usr/lib/qt/mkspecs/features/data/dummy.cpp
/usr/bin/uic src/contactrequest.ui -o src/ui_contactrequest.h
g++ -c -include bin/SilentDragonLite -pipe -g -std=gnu++1y -Wall -Wextra -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQAPPLICATION_CLASS=QApplication -D_FORTIFY_SOURCE=2 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_WEBSOCKETS_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Isrc/3rdparty -Isrc -Isingleapplication -Ires -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtWebSockets -I/usr/include/qt/QtNetwork -I/usr/include/qt/QtCore -Ibin -Isrc -I/usr/lib/qt/mkspecs/linux-g++ -o bin/firsttimewizard.o src/firsttimewizard.cpp
make[1]: *** [Makefile:22: target/release/silentdragonlite.a] Error 101
make[1]: Leaving directory '/home/triplefive/dev/AUR/silentdragonlite/src/silentdragonlite/lib'
make: *** [Makefile:787: /home/triplefive/dev/AUR/silentdragonlite/src/silentdragonlite/lib/target/release/libsilentdragonlite.a] Error 2
make: *** Waiting for unfinished jobs....
src/firsttimewizard.cpp: In constructor ‘NewOrRestorePage::NewOrRestorePage(FirstTimeWizard*)’:
src/firsttimewizard.cpp:137:20: warning: unused variable ‘view’ [-Wunused-variable]
137 | QGraphicsView* view = new QGraphicsView(scene);
| ^~~~
^[[Fsrc/firsttimewizard.cpp: In member function ‘virtual bool NewSeedPage::validatePage()’:
src/firsttimewizard.cpp:621:1: warning: control reaches end of non-void function [-Wreturn-type]
621 | }
| ^
==> ERROR: A failure occurred in build().
Aborting...
```
After running `rustc --explain E0512` we see the issue "Transmute with two differently sized types was attempted."
From https://releases.rs/docs/released/1.64.0/
```
Network primitives are now implemented with the ideal Rust layout, not the C system layout. This can cause problems when transmuting the types.
```
https://github.com/rust-lang/rust/pull/78802/
Completely unsurprisingly, Rust breaks existing code and it's baffling to Rust non-experts how to fix the code. Rust continues to show the world they hate backward compatibility.
Completely unsurprisingly, Rust breaks existing code and it's baffling to Rust non-experts how to fix the code. Rust continues to show the world they hate backward compatibility.
There is good progress. Out of all the offending crates we have already had this fixed and published in socket2 0.3.16
so it's possible that if we update to socket2 0.3.16 it might fix this problem and also it might be an incompatible upgrade that breaks other things.
While reading the GH issue I see this:
```
There is good progress. Out of all the offending crates we have already had this fixed and published in socket2 0.3.16
```
so it's possible that if we update to socket2 0.3.16 it might fix this problem and also it might be an incompatible upgrade that breaks other things.
Below is the error experienced on Rust 1.64.0
After running
rustc --explain E0512
we see the issue "Transmute with two differently sized types was attempted."From https://releases.rs/docs/released/1.64.0/
https://github.com/rust-lang/rust/pull/78802/
Completely unsurprisingly, Rust breaks existing code and it's baffling to Rust non-experts how to fix the code. Rust continues to show the world they hate backward compatibility.
While reading the GH issue I see this:
so it's possible that if we update to socket2 0.3.16 it might fix this problem and also it might be an incompatible upgrade that breaks other things.