I'm working on a program in the Rust programming language. My program uses libraries (called crates in the Rust's ecosystem) with various licenses, like MIT Apache 2.0 and MPL-2.0. Can I use GPL if I build binaries with libraries with such licenses?
The X11/MIT license, the Apache 2.0 license, and the Mozilla Public License 2.0 are all compatible with the GNU GPL version 3, which means you may include code licensed under those various licenses in a larger work that is licensed under the GPLv3.
The MPL 2.0 and X11/MIT license are also compatible with the older GPLv2 license, but the Apache 2.0 license is compatible only with GPLv3. If you use GPLv2 material in a way that requires to license your work under the GPLv2, you may not include other material licensed under Apache 2.0 in that same work, but you may include MPL 2.0 and MIT-licensed material.
If you merely want to license your own work under the GPL and do not use GPL-licensed material from anyone else, you can create an exception to use other code licensed under any terms you like. In that case, your GPL-with-exceptions license is incompatible with any other GPL-licensed code. Downstream recipients can elect to remove the exception, thereby gaining compatibility with other GPL-licensed code but losing compatibility with whatever normally-incompatible code you allowed via your exception.