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

Building on FreeBSD #1168

Closed
wezm opened this Issue Oct 29, 2017 · 4 comments

Comments

Projects
None yet
2 participants
@wezm
Contributor

wezm commented Oct 29, 2017

I guess this is a combination of bug report and documentation. I'll start of with saying I managed to build Tilix 1.7.1 on FreeBSD 11.1. Unfortunately it crashes right after showing the initial window (screenshot of window):

Program received signal SIGSEGV, Segmentation fault.
0x00000000014a3f90 in gdk_x11_get_server_time ()

The steps to build were:

  1. Install dmd from the dlang download page
  2. Install dub from FreeBSD packages
  3. Install dependencies listed in README + gcc (for libstd++).
  4. source ~/dlang/dmd-2.076.1/activate
  5. dub build --build=release -v
  • This works, right up until the linking step, which fails with /usr/bin/ld: cannot find -ldl (libdl is a Linux/glibc thing)
  • Removing -L-ldl from the liking invocation results in source/x11/Xlib.d:(.text._D2gx3gtk3x1117activateX11WindowFC3gtk6Window6WindowZv+0xfa): undefined reference to 'XSendEvent'
  1. Ultimately removing the reference to libdl and adding one to libX11 gets it to link: dmd -of.dub/build/default-release-posix.freebsd-x86_64-dmd_2076-7B2EDFB9396303A2BF2679165D6BB30E/tilix .dub/build/default-release-posix.freebsd-x86_64-dmd_2076-7B2EDFB9396303A2BF2679165D6BB30E/tilix.o ../../../../../home/wmoore/.dub/packages/gtk-d-3.6.6/gtk-d/.dub/build/library-release-posix.freebsd-x86_64-dmd_2076-8020FBA15D9CB282743C46398A5CCB1B/libvted-3.a ../../../../../home/wmoore/.dub/packages/gtk-d-3.6.6/gtk-d/.dub/build/library-release-posix.freebsd-x86_64-dmd_2076-538A4AEA96E4D4D5881193FF1C479054/libgtkd-3.a -L-L/usr/local/lib -L-lX11
  2. The install script had a slight incompatibility with BSD find, which I fixed in #1167.
  3. After installation, running tilix shows the window briefly, then it crashes as mentioned above.

My next planned steps are to do a debug build and see what's causing it to crash. My guess is the window argument to gdk_x11_get_server_time is NULL for some reason.

I've never written any D before so I guess my main reason for opening this issue is to document what I did and to see if you had any guidance for dealing with the linking issues. I.e. how can I influence the linking arguments.

@wezm

This comment has been minimized.

Contributor

wezm commented Oct 29, 2017

Interestingly it's crashing in the same function in #1157

@wezm

This comment has been minimized.

Contributor

wezm commented Oct 29, 2017

Ahh I got a working build with LDC (which I know the README says is unsupported) but still had to diddle with the linking args.

@gnunn1

This comment has been minimized.

Owner

gnunn1 commented Oct 29, 2017

LDC is supported, it says not supported somewhere then that should be corrected. It's GDC that's not supported.

@gnunn1

This comment has been minimized.

Owner

gnunn1 commented Dec 16, 2017

I'm cleaning up older issues and closing this, if you have a new question and want to re-open it feel free.

@gnunn1 gnunn1 closed this Dec 16, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment