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

Lots of build problems #5

Open
mattahorton opened this issue Nov 1, 2022 · 5 comments
Open

Lots of build problems #5

mattahorton opened this issue Nov 1, 2022 · 5 comments

Comments

@mattahorton
Copy link

Hey there, Chris.

I tried to build this, but ran into issues about it not being able to link Hapitrip.

Then I tried to shake up my qt environment and my local environment is now so hosed I can't even recreate the errors.

I know you hadn't intended to share this yet, but the instructions for building guiDemo weren't totally clear.

@mattahorton
Copy link
Author

Reread this, and it's not totally helpful.

I think the place to start is that there were errors with the build finding Hapitrip's symbols. Almost like it was included improperly or not at all.

@mattahorton
Copy link
Author

Undefined symbols for architecture arm64:
"Hapitrip::connectToServer(QString)", referenced from:
MainWindow::on_connectButton_clicked() in mainwindow.o
"Hapitrip::as", referenced from:
MainWindow::updateStateFromUI() in mainwindow.o
MainWindow::on_FPPcomboBox_currentIndexChanged(QString const&) in mainwindow.o
MainWindow::on_channelsSpinBox_valueChanged(int) in mainwindow.o
MainWindow::on_srateComboBox_currentIndexChanged(QString const&) in mainwindow.o
MainWindow::on_audioComboBox_currentIndexChanged(int) in mainwindow.o
MainWindow::on_plcCheckBox_stateChanged(int) in mainwindow.o
"Hapitrip::run()", referenced from:
MainWindow::on_runButton_clicked() in mainwindow.o
"Hapitrip::stop()", referenced from:
MainWindow::on_stopButton_clicked() in mainwindow.o
"vtable for Hapitrip", referenced from:
MainWindow::on_connectButton_clicked() in mainwindow.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [app.app/Contents/MacOS/app] Error 1

@mattahorton
Copy link
Author

Am I supposed to cd guiDemo before the instructions in BUILD.TXT? Because I did.

@mattahorton
Copy link
Author

hey @cchafe after our chat, I fixed my local issues. Running make twice didn't work :/

@nwang92
Copy link

nwang92 commented Feb 10, 2023

I'm pretty sure the build instructions only work on Linux/Ubuntu.

I think I'm able to get a build going through Docker but I have no way of testing it, I just see that the build succeeded. I did have to build each of the individual projects (guiDemo/libregulator, guiDemo/librtaudio, and guiDemo/libhapitrip) before doing the guiDemo build itself.

My Dockerfile:

FROM ubuntu:20.04

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update \
    && apt-get install --no-install-recommends -y qt5-default qt5-qmake qttools5-dev git ca-certificates make cmake \
                                                  build-essential pkg-config libjack-jackd2-dev libasound-dev libpulse-dev

RUN echo "Building hacktrip" \
    && cd /root/ \
    && git clone --recurse-submodules https://github.com/cchafe/hacktrip.git \
    && cd hacktrip \
    && export GIT_SHA=`git rev-parse --short=12 HEAD` \
    && export ARCH=`dpkg --print-architecture` \
    && export LD_LIBRARY_PATH=/root/hacktrip/guiDemo/librtaudio:/root/hacktrip/guiDemo/libhapitrip \
    && echo $LD_LIBRARY_PATH \
    && ls -ltrah \
    && cd guiDemo \
    && echo "Building libregulator" \
    && cd libregulator \
    && qmake libregulator.pro \
    && make clean \
    && make \
    && cd .. \
    && echo "Building librtaudio" \
    && cd librtaudio \
    && qmake librtaudio.pro \
    && make clean \
    && make \
    && cd .. \
    && echo "Building libhapitrip" \
    && cd libhapitrip \
    && qmake libhapitrip.pro \
    && make clean \
    && make \
    && cd .. \
    && echo "Building guiDemo" \
    && qmake guiDemo.pro \
    && make clean \
    && make

Command to execute:

docker build --progress=plain -t hacktrip -f ./Dockerfile .

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

2 participants