Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wont Compile #17

Open
mybigman opened this issue Apr 9, 2020 · 6 comments
Open

Wont Compile #17

mybigman opened this issue Apr 9, 2020 · 6 comments

Comments

@mybigman
Copy link

mybigman commented Apr 9, 2020

I'm submitting a…

[x] Bug
[ ] Feature Request
[ ] Documentation Request
[ ] Other (Please describe in detail)

Current Behavior

wont compile

Expected Behavior

to compile

Note

Downloading the original i3 repo compiles without issues.

Issue

Spews out a pages of this

...
/usr/bin/ld: src/i3-xinerama.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_NET_SUPPORTED.xmacro:31: multiple definition of `A__NET_DESKTOP_NAMES'; src/i3-assignments.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_NET_SUPPORTED.xmacro:31: first defined here
/usr/bin/ld: src/i3-xinerama.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_NET_SUPPORTED.xmacro:32: multiple definition of `A__NET_DESKTOP_VIEWPORT'; src/i3-assignments.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_NET_SUPPORTED.xmacro:32: first defined here
/usr/bin/ld: src/i3-xinerama.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_NET_SUPPORTED.xmacro:33: multiple definition of `A__NET_ACTIVE_WINDOW'; src/i3-assignments.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_NET_SUPPORTED.xmacro:33: first defined here
/usr/bin/ld: src/i3-xinerama.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_NET_SUPPORTED.xmacro:34: multiple definition of `A__NET_CLOSE_WINDOW'; src/i3-assignments.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_NET_SUPPORTED.xmacro:34: first defined here
/usr/bin/ld: src/i3-xinerama.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_NET_SUPPORTED.xmacro:35: multiple definition of `A__NET_MOVERESIZE_WINDOW'; src/i3-assignments.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_NET_SUPPORTED.xmacro:35: first defined here
/usr/bin/ld: src/i3-xinerama.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:1: multiple definition of `A__NET_WM_USER_TIME'; src/i3-assignments.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:1: first defined here
/usr/bin/ld: src/i3-xinerama.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:2: multiple definition of `A__NET_STARTUP_ID'; src/i3-assignments.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:2: first defined here
/usr/bin/ld: src/i3-xinerama.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:3: multiple definition of `A__NET_WORKAREA'; src/i3-assignments.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:3: first defined here
/usr/bin/ld: src/i3-xinerama.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:4: multiple definition of `A_WM_PROTOCOLS'; src/i3-assignments.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:4: first defined here
/usr/bin/ld: src/i3-xinerama.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:5: multiple definition of `A_WM_DELETE_WINDOW'; src/i3-assignments.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:5: first defined here
/usr/bin/ld: src/i3-xinerama.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:6: multiple definition of `A_UTF8_STRING'; src/i3-assignments.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:6: first defined here
/usr/bin/ld: src/i3-xinerama.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:7: multiple definition of `A_WM_STATE'; src/i3-assignments.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:7: first defined here
/usr/bin/ld: src/i3-xinerama.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:8: multiple definition of `A_WM_CLIENT_LEADER'; src/i3-assignments.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:8: first defined here
/usr/bin/ld: src/i3-xinerama.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:9: multiple definition of `A_WM_TAKE_FOCUS'; src/i3-assignments.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:9: first defined here
/usr/bin/ld: src/i3-xinerama.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:10: multiple definition of `A_WM_WINDOW_ROLE'; src/i3-assignments.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:10: first defined here
/usr/bin/ld: src/i3-xinerama.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:11: multiple definition of `A_I3_SOCKET_PATH'; src/i3-assignments.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:11: first defined here
/usr/bin/ld: src/i3-xinerama.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:12: multiple definition of `A_I3_CONFIG_PATH'; src/i3-assignments.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:12: first defined here
/usr/bin/ld: src/i3-xinerama.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:13: multiple definition of `A_I3_SYNC'; src/i3-assignments.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:13: first defined here
/usr/bin/ld: src/i3-xinerama.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:14: multiple definition of `A_I3_SHMLOG_PATH'; src/i3-assignments.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:14: first defined here
/usr/bin/ld: src/i3-xinerama.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:15: multiple definition of `A_I3_PID'; src/i3-assignments.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:15: first defined here
/usr/bin/ld: src/i3-xinerama.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:16: multiple definition of `A_I3_FLOATING_WINDOW'; src/i3-assignments.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:16: first defined here
/usr/bin/ld: src/i3-xinerama.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:17: multiple definition of `A__NET_REQUEST_FRAME_EXTENTS'; src/i3-assignments.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:17: first defined here
/usr/bin/ld: src/i3-xinerama.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:18: multiple definition of `A__NET_FRAME_EXTENTS'; src/i3-assignments.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:18: first defined here
/usr/bin/ld: src/i3-xinerama.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:19: multiple definition of `A__MOTIF_WM_HINTS'; src/i3-assignments.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:19: first defined here
/usr/bin/ld: src/i3-xinerama.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:20: multiple definition of `A_WM_CHANGE_STATE'; src/i3-assignments.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/include/atoms_rest.xmacro:20: first defined here
/usr/bin/ld: ./libi3.a(a-draw_util.o):/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/libi3/draw_util.c:19: multiple definition of `visual_type'; src/i3-main.o:/home/champ/downloads/i3/x86_64-pc-linux-gnu/../../i3/src/main.c:63: first defined here
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:1587: i3] Error 1
make[1]: Leaving directory '/home/champ/downloads/i3/x86_64-pc-linux-gnu'
make: *** [Makefile:1332: all] Error 2

Environment

- Linux Distribution & Version: Fedora 32
@deionizedoatmeal
Copy link

I've been struggling with this issue on my arch system. My workaround was to use Clang as the compiler instead of GCC and then everything built and installed fine.

I don't really know much C so I really have no idea why this would be the case. Maybe it has something to do with GCC not fully supporting the C99 standard, but don't quote me on that.

Anyways the way I did this just to install clang, then change my environment variables:

export CC=/usr/bin/clang
export CXX=/usr/bin/clang++

and then build from source as you would normally with i3.

Hope this helps.

@dunestorm333
Copy link

Same problem, can't build.

@deionizedoatmeal Unfortunately your suggestion doesn't work as I get:

configure: error: C compiler cannot create executables

@Syycorax
Copy link

Same problem :/
As @dunestorm333 The workaround don't work for me, get this
export CXX=/usr/bin/clang++

@Nycz-lab
Copy link

Nycz-lab commented Dec 6, 2020

same problem however when i use clang i get "linker command failed with exit code 1" if anyone has a solution pls msg me

@pellizzetti
Copy link

pellizzetti commented Jan 3, 2021

Setting GCC environment variables as such solved it for me:

export CPPFLAGS="-U_FORTIFY_SOURCE"
export CFLAGS=" -fcommon"

@misss13
Copy link

misss13 commented Aug 9, 2021

Setting GCC environment variables as such solved it for me:

export CPPFLAGS="-U_FORTIFY_SOURCE"
export CFLAGS=" -fcommon"

Works for me ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants