Skip to content

Conversation

thiagomacieira
Copy link
Member

@thiagomacieira thiagomacieira commented Oct 24, 2023

Otherwise, it can't find the sources.

Here's the script that we use to build the dependency:

        test -x configure || autoreconf --install --symlink -f
        mkdir -p build
        (
            cd build
            ../configure --prefix=$prefix --libdir=$libdir \
                         --enable-static --disable-shared \
                         --host=$target_triple \
                         CFLAGS="$CFLAGS -O2 -fPIC -DNDEBUG"
            ${MAKE-make} -C src V=1
        )

The important step is the mkdir build && cd build && ../configure.

Otherwise, it can't find the sources.

Signed-off-by: Thiago Macieira <[email protected]>
-I./ \
-I../include/ \
-I$(srcdir) \
-I$(top_srcdir)/include \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not make sense to me since it's trying to include public and internal header file for source code build with relative path.
Why we need to change it to use absolute folder?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the relative path is wrong. From QATzip/build/src + ../include you only get to QATzip/build/include and the headers are not there. The relative paths are relative to where the compiler is launched, not to where the file is.

qatlib needed a similar fix, see intel/qatlib#57

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hello, @thiagomacieira, very thanks for your PR, but this issue is caused by the script "cd build ..... ${MAKE-make} -C src V=1", it means you are build the qatzip lib out the "QZ_ROOT".
For now, we don't recommand the customer to build the qatzip lib out of the "QZ_ROOT", because it may cause the Version confusion or other issue when you use the perf script from the qatzip. we recommand you to build the qatzip in QZ_ROOT, then maybe install the qatzip lib. it would aviod this issue.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't care about perf scripts. I just need to build and building out-of-tree is a requirement. This patch fixes the build.

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

Successfully merging this pull request may close these issues.

3 participants