Error during make on Ubuntu jammy

Asked by Aniruddha

I get the following error when I try fio compilation on ubuntu jammy.

$ ./configure --extra-cflags='-fcommon -I/var/vcap/packages/libaio/include -L/var/vcap/packages/libaio/lib'
$ make
....
....
....
/usr/bin/ld: cannot find -laio: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [Makefile:585: fio] Error 1

Can you please help on how this can be resolved?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu fio Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

"cannot find -laio: No such file or directory"
This indicates that the aio library cannot be found.

In Ubuntu it is provided by the libaio-dev package, but in a different directory than the one that you provide in the configure command.

What is the reason for adding /var/vcap/packages/libaio/ ? If you provide a path that is different from the Ubuntu standards, then you have to manage the availability of the libraries yourself.

My recommendation:
Install the libaio-dev package and remove the "-I/var/vcap/packages/libaio/include -L/var/vcap/packages/libaio/lib" part from the configure command.

Revision history for this message
Aniruddha (anirkulk) said :
#2

Hi

Thanks for your reply. I must add that I am already compiling libaio as follows:

make prefix="/var/vcap/packages/libaio" install

This should ensure that libaio is found at /var/vcap/packages/libaio, right?

Regards
Ani

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

If you do not use the Ubuntu-provided version of the software, then the Ubuntu question area is not the right address to ask for help.

Revision history for this message
Aniruddha (anirkulk) said :
#4

Hi Manfred Hampl

I am using ubuntu packages.

fio: https://packages.ubuntu.com/jammy/fio
libaio: https://packages.ubuntu.com/jammy/libaio1

Do you still see some issue with above packages?

Regards
Ani

Revision history for this message
Manfred Hampl (m-hampl) said :
#5

If you have the aio files in /var/vcap/packages/libaio, then you are not using the Ubuntu packages.

Can you help with this problem?

Provide an answer of your own, or ask Aniruddha for more information if necessary.

To post a message you must log in.