Giter Site home page Giter Site logo

Comments (4)

guyharris avatar guyharris commented on May 24, 2024

But I cross compile libpcap successfully.

Did you put the tcpdump and libpcap source files in subdirectories of the same directory, so that, for example, you have, in that directory, libpcap-1.11.0-PRE-GIT and tcpdump-5.0.0-PRE-GIT source directories?

If not, after you cross-compiled libpcap, did you install it?

The errors from the configure script for tcpdump are:

configure:6027: riscv64-unknown-linux-gnu-gcc -o conftest -g -O2   conftest.c -lpcap  >&5
/mnt/disk/ssw/toolchain/install/urgcc-3.11.74/linux/bin/../lib/gcc/riscv64-unknown-linux-gnu/11.1.0/../../../../riscv64-unknown-linux-gnu/bin/ld: cannot find -lpcap: No such file or directory

which means that the cross-compiler, when run by the configure script, didn't find libpcap in any of the directories in which it normally looks for libraries.

from tcpdump.

ultrariscwangjiahao avatar ultrariscwangjiahao commented on May 24, 2024

So,I should put the tcpdump and libpcap source file in the same directory.Such as:/home/user/code/tcpdump/(tcp source code) and /home/user/code/libpcap/(libpcap source code)? or /home/user/code/(tcpdump souce code and libcap source code) ?

from tcpdump.

guyharris avatar guyharris commented on May 24, 2024

So,I should put the tcpdump and libpcap source file in the same directory.Such as:/home/user/code/tcpdump/(tcp source code) and /home/user/code/libpcap/(libpcap source code)? or /home/user/code/(tcpdump souce code and libcap source code) ?

Do it as /home/user/code/(tcpdump source code and libpcap source code), for example, /home/user/code/tcpdump-5.0.0-PRE-GIT, with the tcpdump source code in the /home/user/code/tcpdump-5.0.0-PRE-GIT directory, and /home/user/code/libpcap-1.11.0-PRE-GIT, with the libpcap source code in the /home/user/code/libpcap-1.11.0-PRE-GIT directory.

If you are using autotools (the configure scripts) rather than CMake, there are two ways to build libpcap from source and then build tcpdump from source using that libpcap:

  1. put the two source file directories in the same parent directory, change to the libpcap source directory, run the configure script, run make, change to the tcpdump source directory, run the configure script, and run make;
  2. put them wherever you want, change to the libpcap source directory, run the configure script, run make, do a "make install", change to the tcpdump source directory, run the configure script, and run make.

from tcpdump.

ultrariscwangjiahao avatar ultrariscwangjiahao commented on May 24, 2024

Thanks very much!!Now I can cross compile tcpdump for riscv64 successfully.

from tcpdump.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.