Failed to compile netperf 2.7.0 using Cygwin - gcc

Not sure if this is the right place to ask this but I am having issue getting netperf 2.7.0 using Cygwin. Based on what I read, many people have success getting netperf to compile using Cygwin so I am hoping that I am missing some libraries that I forgot to install and hoping someone would shed me some light on this.
Here's the sequence of steps I took for compilation.
wget https://github.com/HewlettPackard/netperf/archive/netperf-2.7.0.tar.gz
tar -zxvf netperf-2.7.0.tar.gz
cd netperf-netperf-2.7.0
./configure
./make all
The following is a snippet of the error ouput
mv -f .deps/netcpu_none.Tpo .deps/netcpu_none.Po
gcc -o netperf.exe netperf.o netlib.o netsh.o nettest_bsd.o nettest_dlpi.o nettest_unix.o nettest_xti.o nettest_sctp.o nettest_sdp.o nettest_omni.o net_uuid.o dscp.o netcpu_none.o -lm
/usr/lib/gcc/x86_64-pc-cygwin/9.3.0/../../../../x86_64-pc-cygwin/bin/ld: netlib.o:netlib.c:(.text+0x1b46): undefined reference to `__CPU_ZERO'
netlib.o:netlib.c:(.text+0x1b46): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `__CPU_ZERO'
/usr/lib/gcc/x86_64-pc-cygwin/9.3.0/../../../../x86_64-pc-cygwin/bin/ld: netlib.o:netlib.c:(.text+0x1b57): undefined reference to `__CPU_SET'
netlib.o:netlib.c:(.text+0x1b57): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `__CPU_SET'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:305: netperf.exe] Error 1
make[3]: Leaving directory '/home/David Chu/workspace/netperf-netperf-2.7.0/src'
make[2]: *** [Makefile:352: all-recursive] Error 1
make[2]: Leaving directory '/home/David Chu/workspace/netperf-netperf-2.7.0/src'
make[1]: *** [Makefile:277: all-recursive] Error 1
make[1]: Leaving directory '/home/David Chu/workspace/netperf-netperf-2.7.0'
make: *** [Makefile:215: all] Error 2
Attached is the full compilation log
compilation.log
Thanks in advance!
Note: The same question was also posted on netperf github's project but activity on that project is low to nothing so I decided to post here as well. https://github.com/HewlettPackard/netperf/issues/41

You can try to make changes to /usr/include/sys/cpuset.h with #if 1 //__GNU_VISIBLE,
and remove __ from __CPU_ZERO in src/netlib.c

Related

VLC 3.0.12/3.0.14 once command source build fails on macOS

Running mac osx 10.14.6 and have previously successfully built 3.0.10 and 3.0.11. Trying to build VLC 3.0.12 & 3.0.14 from source downloaded from here: http://www.videolan.org/vlc/download-sources.html
and using recommended build from here: https://wiki.videolan.org/MacOSCompile/ AND using the recommended:
../extras/package/macosx/build.sh -c
Build runs for about 20 minutes and then stops here (snip of output):
CCLD libprefetch_plugin.la
CCLD libhds_plugin.la
CCLD librecord_plugin.la
ld: library not found for -lzstd
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[4]: *** [libarchive_plugin.la] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
mysystem:build xx$
What am I missing or doing wrong?
Note: in previous builds I could find a cmake/Utilities/cmzstd/lib directory in vlc-3.0.x/extras/tools that had various zstd files however it is not there in either 3.0.12 or 3.0.14 - only a cmake-enable-ALPN-support-on-macOS-109.14.patch file.
Where do I find zstd? Thanks.
Seems the issue is related to how macOS and packagers (homebrew, etc.) load components. macOS provides a compiled version of libarchive but no headers, so you are unable in trying to compile. You will either need to pass the location of your libarchive respository with headers via your build script or set an environment variable telling the compiler or linker where to look for them. Perhaps someone more familiar with your VLC package can weigh in.

Building Artery on Ubuntu fails

When I try to build Artery on Ubuntu 16.04. the following happens after invoking
$ cmake --build /home/hardt/Veins/artery-master/build
[ 23%] Linking CXX shared library libartery.so
/usr/bin/ld: /usr/local/lib/libvanetza_btp.a(data_request.cpp.o): relocation R_X86_64_32 against `.bss' can not be used when making a shared
object; recompile with -fPIC
/usr/local/lib/libvanetza_btp.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
src/artery/CMakeFiles/artery.dir/build.make:954: recipe for target'src/artery/libartery.so' failed
make[2]: *** [src/artery/libartery.so] Error 1
CMakeFiles/Makefile2:229: recipe for target 'src/artery/CMakeFiles/artery.dir/all' failed
make[1]: *** [src/artery/CMakeFiles/artery.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
As I am not all that familiar with building source on Unix systems I am not quite sure how to deal with this error.
I am using cmake version 3.9.3, boost 1.65.1 and crypto++ 5.6.4 the geographiclib built without error as well.
As one can read in the comments, the problem is solved.
The path to the vanetza directory VANETZA_DIR in the cmake configuration was wrong. Correcting this via ccmake solved the problem.

make/cmake error: relocation R_X86_64_32 against `ff_a64_muxer' can not be used when making a shared object

Here's what's going on. I'm trying to set up OpenSceneGraph, however I run into the following error during the make process (spaces added for easier reading):
/usr/bin/ld: /usr/local/lib/libavformat.a(allformats.o): relocation R_X86_64_32 against `ff_a64_muxer' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libavformat.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
src/osgPlugins/ffmpeg/CMakeFiles/osgdb_ffmpeg.dir/build.make:291: recipe for target 'lib/osgPlugins-3.4.0/osgdb_ffmpeg.so' failed
make[2]: *** [lib/osgPlugins-3.4.0/osgdb_ffmpeg.so] Error 1
CMakeFiles/Makefile2:6663: recipe for target
'src/osgPlugins/ffmpeg/CMakeFiles/osgdb_ffmpeg.dir/all' failed
make[1]: *** [src/osgPlugins/ffmpeg/CMakeFiles/osgdb_ffmpeg.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
This error does not stop the cmake process. A little later (error above occurs at 39%, process fails at 46%), I get this error:
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
Then the process stops.
I've looked at some other solutions, but they didn't have what I needed (here and here). I've run cmake with the -fPIC flag and that didn't solve anything.
I found a potential solution here but I don't know how to implement "recompile your FFmpeg/libavcodec/libavformat with pic enabled". Can anyone talk me through it or give me a good resource? I've never done it before and I don't want to mess up my computer.
Any help would be much appreciated. Thanks in advance!

Cannot build capybara-webkit 1.3 on Windows 7 64-bit (ruby 2.1.3)

I've followed the process outlined in the guide for several different versions of Qt (I've tried 4.8.4, 4.8.5 and 4.8.6 - now trying 4.5.4), but none have managed to complete the rake build step.
This is my current environment:
which qmake
C:\Qt\5.4\msvc2013_64\bin\qmake.EXE
which ruby
C:\Ruby21-x64\bin\ruby.EXE
which make
C:\Ruby21-x64\devkit\bin\make.EXE
And this is the current error returned from running bundle exec rake build in the capybara-webkit repository.
H:\capybara-webkit>bundle exec rake build
DL is deprecated, please use Fiddle
DL is deprecated, please use Fiddle
c:/Qt/5.4/msvc2013_64/bin/qmake.exe -spec win32-g++ CONFIG\+\=test -o Makefile w
ebkit_server.pro
cd src/ && ( test -e Makefile.webkit_server || c:/Qt/5.4/msvc2013_64/bin/qmake.e
xe H:/capybara-webkit/src/webkit_server.pro -spec win32-g++ CONFIG\+\=test -o Ma
kefile.webkit_server ) && make -f Makefile.webkit_server
make[1]: Entering directory `/h/capybara-webkit/src'
c:/Qt/5.4/msvc2013_64/bin/qmake.exe -spec win32-g++ CONFIG+=test -o Makefile.web
kit_server webkit_server.pro
make[1]: Leaving directory `/h/capybara-webkit/src'
make[1]: Entering directory `/h/capybara-webkit/src'
make -f Makefile.webkit_server.Release
make[2]: Entering directory `/h/capybara-webkit/src'
g++ -Wl,-s -Wl,-subsystem,console -mthreads -o release/webkit_server.exe object_
script.webkit_server.Release -LC:/Qt/5.4/msvc2013_64/lib -lQt5WebKitWidgets -lQ
t5Widgets -lQt5WebKit -lQt5Gui -lQt5Network -lQt5Core
./build/SetUnknownUrlMode.o:SetUnknownUrlMode.cpp:(.text+0x23): undefined refere
nce to `__imp__ZN10QArrayData10deallocateEPS_yy'
./build/SetUnknownUrlMode.o:SetUnknownUrlMode.cpp:(.text+0x92): undefined refere
nce to `__imp__ZN9QListData7disposeEPNS_4DataE'
./build/SetUnknownUrlMode.o:SetUnknownUrlMode.cpp:(.text+0x167): undefined refer
ence to `__imp__ZN9QListData11shared_nullE'
./build/SetUnknownUrlMode.o:SetUnknownUrlMode.cpp:(.text+0x16e): undefined refer
ence to `__imp__ZN7QString16fromAscii_helperEPKci'
./build/SetUnknownUrlMode.o:SetUnknownUrlMode.cpp:(.text+0x289): undefined refer
ence to `__imp__ZeqRK7QStringS1_'
./build/SetUnknownUrlMode.o:SetUnknownUrlMode.cpp:(.text+0x2fa): undefined refer
ence to `__imp__ZN7QString6appendERKS_'
./build/SetUnknownUrlMode.o:SetUnknownUrlMode.cpp:(.text+0x4b7): undefined refer
ence to `__imp__ZN10QArrayData10deallocateEPS_yy'
./build/SetUnknownUrlMode.o:SetUnknownUrlMode.cpp:(.text+0x4e5): undefined refer
ence to `__imp__ZN10QArrayData10deallocateEPS_yy'
./build/SetUnknownUrlMode.o:SetUnknownUrlMode.cpp:(.text+0x515): undefined refer
ence to `__imp__ZN10QArrayData10deallocateEPS_yy'
./build/SetUnknownUrlMode.o:SetUnknownUrlMode.cpp:(.text+0x595): undefined refer
ence to `__imp__ZN10QArrayData10deallocateEPS_yy'
./build/SetUnknownUrlMode.o:SetUnknownUrlMode.cpp:(.text+0x5c0): undefined refer
ence to `__imp__ZN10QArrayData10deallocateEPS_yy'
./build/SetUnknownUrlMode.o:SetUnknownUrlMode.cpp:(.text+0x5e6): more undefined
references to `__imp__ZN10QArrayData10deallocateEPS_yy' follow
c:/ruby21-x64/devkit/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x
86_64-w64-mingw32/bin/ld.exe: ./build/SetUnknownUrlMode.o: bad reloc address 0x0
in section `.pdata'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [release/webkit_server.exe] Error 1
make[2]: Leaving directory `/h/capybara-webkit/src'
make[1]: *** [release] Error 2
make[1]: Leaving directory `/h/capybara-webkit/src'
make: *** [sub-src-webkit_server-pro-make_first-ordered] Error 2
Command 'make' failed
If anyone has problems compiling capybara-webkit on Windows (and doesn't want to spend two days in google-purgatory) they can read this.

LFS 7.2 glibc-2.16.0 make error

I'm building an LFS system ( refering to LFS 7.2 )
I got this make error while building glibc-2.16.0:
/mnt/lfs/tools/bin/../lib/gcc/i686-lfs-linux-gnu/4.7.1/../../../../i686-lfs-linux-gnu/bin/ld: cannot find -lgcc_s
collect2: error: ld returned 1 exit status
make[2]: *** [/mnt/lfs/sources/glibc-build/iconv/iconvconfig] Error 1
make[2]: Leaving directory `/mnt/lfs/sources/glibc-2.16.0/iconv'
make[1]: *** [iconv/others] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/glibc-2.16.0'
make: *** [all] Error 2
lfs:/mnt/lfs/sources/glibc-build$
I located the libgcc_s file in three different places:
/usr/lib/libgcc_s-4.7.0-20120507.so.1
/usr/lib/libgcc_s.so.1
/usr/lib/gcc/i686-redhat-linux/4.7.0/libgcc_s.so
I tried overiding the LDFLAGS variable but no success.
Can any one please help me with this problem. Or am I missing something? I don't know.
Please help guys,
My host system is Fedora 17.
You need to set the LD_LIBRARY_PATH variable. LD_LIBRARY_PATH is a colon-separated set of directories where libraries should be searched for first, before the standard set of directories. LDFLAGS would contain options to pass to the linker.
The likely problem is that you don't have /usr/lib/gcc/i686-redhat-linux/4.7.0 in the LD_LIBRARY_PATH. The other two libraries mentioned in /usr/lib/ shall not be picked unless you have a symlink libgcc_s.so in your LD_LIBRARY_PATH that points to one of those.

Resources