public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: Ammar Faizi <[email protected]>
Cc: io-uring Mailing List <[email protected]>,
	GNU/Weeb Mailing List <[email protected]>
Subject: Re: [PATCH liburing v1 2/2] test/Makefile: Append `.test` to the test binary filename
Date: Sun, 3 Apr 2022 09:00:59 -0600	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

On 4/3/22 8:55 AM, Ammar Faizi wrote:
> On 4/3/22 9:51 PM, Jens Axboe wrote:
>> On 4/3/22 3:56 AM, Ammar Faizi wrote:
>>> When adding a new test, we often forget to add the new test binary to
>>> `.gitignore`. Append `.test` to the test binary filename, this way we
>>> can use a wildcard matching "test/*.test" in `.gitignore` to ignore all
>>> test binary files.
>>
>> Did you build it?
>>
>>       CC 917257daa0fe-test.test
>> /usr/bin/ld: /tmp/ccGrhiuN.o: in function `thread_start':
>> /home/axboe/git/liburing/test/35fa71a030ca-test.c:52: undefined reference to `pthread_attr_setstacksize'
>> /usr/bin/ld: /home/axboe/git/liburing/test/35fa71a030ca-test.c:55: undefined reference to `pthread_create'
>>       CC a0908ae19763-test.test
>> collect2: error: ld returned 1 exit status
>> make[1]: *** [Makefile:210: 35fa71a030ca-test.test] Error 1
>> make[1]: *** Waiting for unfinished jobs....
>> /usr/bin/ld: /tmp/cc2nozDW.o: in function `main':
>> /home/axboe/git/liburing/test/232c93d07b74-test.c:295: undefined reference to `pthread_create'
>> /usr/bin/ld: /home/axboe/git/liburing/test/232c93d07b74-test.c:296: undefined reference to `pthread_create'
>> /usr/bin/ld: /home/axboe/git/liburing/test/232c93d07b74-test.c:297: undefined reference to `pthread_join'
>> /usr/bin/ld: /home/axboe/git/liburing/test/232c93d07b74-test.c:298: undefined reference to `pthread_join'
>> collect2: error: ld returned 1 exit status
>> make[1]: *** [Makefile:210: 232c93d07b74-test.test] Error 1
>> make[1]: Leaving directory '/home/axboe/git/liburing/test'
>>
>> I do like the idea of not having to keep fixing that gitignore list.
> 
> Hmm.. weird... It builds just fine from my end.
> Can you show the full commands?

Sure, here it is:

axboe@m1 ~/gi/liburing (master)> make V=1                                    0.011s
Running configure ...
prefix                        /usr
includedir                    /usr/include
libdir                        /usr/lib
libdevdir                     /usr/lib
relativelibdir                
mandir                        /usr/man
datadir                       /usr/share
stringop_overflow             yes
array_bounds                  yes
__kernel_rwf_t                yes
__kernel_timespec             yes
open_how                      yes
statx                         yes
glibc_statx                   yes
C++                           yes
has_ucontext                  yes
has_memfd_create              yes
liburing_nolibc               no
CC                            gcc
CXX                           g++
make[1]: Entering directory '/home/axboe/git/liburing/src'
gcc -D_GNU_SOURCE -Iinclude/ -include ../config-host.h -MT "setup.ol" -MMD -MP -MF "setup.ol.d" -g -O2 -Wall -Wextra -fno-stack-protector -Wno-unused-parameter -Wno-sign-compare -DLIBURING_INTERNAL -c -o setup.ol setup.c
gcc -D_GNU_SOURCE -Iinclude/ -include ../config-host.h -MT "queue.ol" -MMD -MP -MF "queue.ol.d" -g -O2 -Wall -Wextra -fno-stack-protector -Wno-unused-parameter -Wno-sign-compare -DLIBURING_INTERNAL -c -o queue.ol queue.c
gcc -D_GNU_SOURCE -Iinclude/ -include ../config-host.h -MT "register.ol" -MMD -MP -MF "register.ol.d" -g -O2 -Wall -Wextra -fno-stack-protector -Wno-unused-parameter -Wno-sign-compare -DLIBURING_INTERNAL -c -o register.ol register.c
gcc -D_GNU_SOURCE -Iinclude/ -include ../config-host.h -MT "syscall.ol" -MMD -MP -MF "syscall.ol.d" -g -O2 -Wall -Wextra -fno-stack-protector -Wno-unused-parameter -Wno-sign-compare -DLIBURING_INTERNAL -c -o syscall.ol syscall.c
ar r liburing.a setup.ol queue.ol register.ol syscall.ol
ar: creating liburing.a
ranlib liburing.a
gcc -D_GNU_SOURCE -Iinclude/ -include ../config-host.h -MT "setup.os" -MMD -MP -MF "setup.os.d" -fPIC -g -O2 -Wall -Wextra -fno-stack-protector -Wno-unused-parameter -Wno-sign-compare -DLIBURING_INTERNAL -c -o setup.os setup.c
gcc -D_GNU_SOURCE -Iinclude/ -include ../config-host.h -MT "queue.os" -MMD -MP -MF "queue.os.d" -fPIC -g -O2 -Wall -Wextra -fno-stack-protector -Wno-unused-parameter -Wno-sign-compare -DLIBURING_INTERNAL -c -o queue.os queue.c
gcc -D_GNU_SOURCE -Iinclude/ -include ../config-host.h -MT "register.os" -MMD -MP -MF "register.os.d" -fPIC -g -O2 -Wall -Wextra -fno-stack-protector -Wno-unused-parameter -Wno-sign-compare -DLIBURING_INTERNAL -c -o register.os register.c
gcc -D_GNU_SOURCE -Iinclude/ -include ../config-host.h -MT "syscall.os" -MMD -MP -MF "syscall.os.d" -fPIC -g -O2 -Wall -Wextra -fno-stack-protector -Wno-unused-parameter -Wno-sign-compare -DLIBURING_INTERNAL -c -o syscall.os syscall.c
gcc -fPIC -g -O2 -Wall -Wextra -fno-stack-protector -Wno-unused-parameter -Wno-sign-compare -DLIBURING_INTERNAL -shared -Wl,--version-script=liburing.map -Wl,-soname=liburing.so.2 -o liburing.so.2.2 setup.os queue.os register.os syscall.os 
make[1]: Leaving directory '/home/axboe/git/liburing/src'
make[1]: Entering directory '/home/axboe/git/liburing/test'
gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -g -O2 -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o helpers.o -c helpers.c
gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -g -O2 -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o ../src/syscall.o -c ../src/syscall.c
gcc -D_GNU_SOURCE -D__SANE_USERSPACE_TYPES__ -I../src/include/ -include ../config-host.h -g -O2 -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -Wstringop-overflow=0 -Warray-bounds=0 -DLIBURING_BUILD_TEST -o 232c93d07b74-test.test 232c93d07b74-test.c helpers.o ../src/syscall.o -L../src/ -luring
/usr/bin/ld: /tmp/cchfKQEY.o: in function `main':
/home/axboe/git/liburing/test/232c93d07b74-test.c:295: undefined reference to `pthread_create'
/usr/bin/ld: /home/axboe/git/liburing/test/232c93d07b74-test.c:296: undefined reference to `pthread_create'
/usr/bin/ld: /home/axboe/git/liburing/test/232c93d07b74-test.c:297: undefined reference to `pthread_join'
/usr/bin/ld: /home/axboe/git/liburing/test/232c93d07b74-test.c:298: undefined reference to `pthread_join'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:210: 232c93d07b74-test.test] Error 1
make[1]: Leaving directory '/home/axboe/git/liburing/test'
make: *** [Makefile:11: all] Error 2

-- 
Jens Axboe


  reply	other threads:[~2022-04-03 15:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-03  9:56 [PATCH liburing v1 0/2] SPDX fix and .gitignore improvement Ammar Faizi
2022-04-03  9:56 ` [PATCH liburing v1 1/2] src/int_flags.h: Add missing SPDX-License-Identifier Ammar Faizi
2022-04-03  9:56 ` [PATCH liburing v1 2/2] test/Makefile: Append `.test` to the test binary filename Ammar Faizi
2022-04-03 14:51   ` Jens Axboe
2022-04-03 14:55     ` Ammar Faizi
2022-04-03 15:00       ` Jens Axboe [this message]
2022-04-03 15:05         ` Ammar Faizi
2022-04-03 15:06           ` Jens Axboe
2022-04-03 14:52 ` (subset) [PATCH liburing v1 0/2] SPDX fix and .gitignore improvement Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox