am trying to build veins on OMNet++5.1on ubuntu 14.04 but cant get it to work. both veins 4.4 and veins 4.5 give the same error. here is my stack trace:
18:40:54 **** Build of configuration gcc-debug for project veins ****
make MODE=debug all
make[1]: Entering directory `/opt/veins-veins-4.4/src'
MSGC: veins/base/messages/AirFrame.msg
MSGC: veins/base/messages/BorderMsg.msg
MSGC: veins/base/messages/ChannelSenseRequest.msg
MSGC: veins/base/messages/MacPkt.msg
MSGC: veins/modules/messages/AirFrame11p.msg
MSGC: veins/modules/messages/Mac80211Pkt.msg
MSGC: veins/modules/messages/PhyControlMessage.msg
MSGC: veins/modules/messages/WaveShortMessage.msg
veins/base/connectionManager/BaseConnectionManager.cc
veins/base/connectionManager/ChannelAccess.cc
veins/base/connectionManager/ConnectionManager.cc
veins/base/connectionManager/NicEntryDebug.cc
veins/base/connectionManager/NicEntryDirect.cc
veins/base/modules/BaseApplLayer.cc
veins/base/modules/BaseBattery.cc
veins/base/modules/BaseLayer.cc
veins/base/modules/BaseMacLayer.cc
veins/base/modules/BaseMobility.cc
veins/base/modules/BaseModule.cc
veins/base/modules/BaseWorldUtility.cc
veins/base/modules/BatteryAccess.cc
veins/base/phyLayer/BaseDecider.cc
veins/base/phyLayer/BasePhyLayer.cc
veins/base/phyLayer/ChannelInfo.cc
veins/base/phyLayer/ChannelState.cc
veins/base/phyLayer/Decider.cc
veins/base/phyLayer/MappingBase.cc
veins/base/phyLayer/MappingUtils.cc
veins/base/phyLayer/PhyUtils.cc
veins/base/phyLayer/Signal.cc
veins/base/utils/asserts.cc
veins/base/utils/Coord.cc
veins/base/utils/NetwToMacControlInfo.cc
veins/base/utils/SimpleAddress.cc
veins/base/utils/winsupport.cc
veins/modules/analogueModel/BreakpointPathlossModel.cc
veins/modules/analogueModel/JakesFading.cc
veins/modules/analogueModel/LogNormalShadowing.cc
veins/modules/analogueModel/NakagamiFading.cc
veins/modules/analogueModel/PERModel.cc
veins/modules/analogueModel/SimpleObstacleShadowing.cc
veins/modules/analogueModel/SimplePathlossModel.cc
veins/modules/analogueModel/TwoRayInterferenceModel.cc
veins/modules/application/ieee80211p/BaseWaveApplLayer.cc
veins/modules/application/traci/TraCIDemo11p.cc
veins/modules/application/traci/TraCIDemoRSU11p.cc
veins/modules/application/traci/TraCITestApp.cc
veins/modules/mac/ieee80211p/Mac1609_4.cc
veins/modules/mobility/traci/TraCIBuffer.cc
veins/modules/mobility/traci/TraCIColor.cc
veins/modules/mobility/traci/TraCICommandInterface.cc
veins/modules/mobility/traci/TraCIConnection.cc
veins/modules/mobility/traci/TraCIMobility.cc
veins/modules/mobility/traci/TraCIScenarioManager.cc
veins/modules/mobility/traci/TraCIScenarioManagerInet.cc
veins/modules/mobility/traci/TraCIScenarioManagerLaunchd.cc
veins/modules/mobility/traci/TraCIScenarioManagerLaunchd.cc: In member function ‘virtual void Veins::TraCIScenarioManagerLaunchd::init_traci()’:
veins/modules/mobility/traci/TraCIScenarioManagerLaunchd.cc:91:39: error: ‘class omnetpp::cXMLElement’ has no member named ‘tostr’
std::string contents = launchConfig->tostr(0);
^
make[1]: *** [../out/gcc-debug/src/veins/modules/mobility/traci/TraCIScenarioManagerLaunchd.o] Error 1
make[1]: Leaving directory `/opt/veins-veins-4.4/src'
make: *** [all] Error 2
18:41:46 Build Finished (took 52s.0ms)
Please help me out
Related
I tried to write a demo program of drm, but I encountered undefined reference to problems:
xjt#u16:~/SF6_RV1126/drmDemo/build$ make -j8
Scanning dependencies of target drmDemo
[ 50%] Building C object bin/CMakeFiles/drmDemo.dir/main.c.o
[100%] Linking C executable drmDemo
/home/xjt/SF6_RV1126/RV1126/prebuilts/gcc/linux-x86/arm/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: CMakeFiles/drmDemo.dir/main.c.o: in function `modeset_create_fb':
main.c:(.text+0x6c): undefined reference to `drmIoctl'
/home/xjt/SF6_RV1126/RV1126/prebuilts/gcc/linux-x86/arm/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.c:(.text+0xe0): undefined reference to `drmModeAddFB'
/home/xjt/SF6_RV1126/RV1126/prebuilts/gcc/linux-x86/arm/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.c:(.text+0x100): undefined reference to `drmIoctl'
/home/xjt/SF6_RV1126/RV1126/prebuilts/gcc/linux-x86/arm/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: CMakeFiles/drmDemo.dir/main.c.o: in function `modeset_destroy_fb':
main.c:(.text+0x194): undefined reference to `drmModeRmFB'
/home/xjt/SF6_RV1126/RV1126/prebuilts/gcc/linux-x86/arm/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.c:(.text+0x1d4): undefined reference to `drmIoctl'
/home/xjt/SF6_RV1126/RV1126/prebuilts/gcc/linux-x86/arm/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: CMakeFiles/drmDemo.dir/main.c.o: in function `main':
main.c:(.text+0x214): undefined reference to `drmModeGetResources'
/home/xjt/SF6_RV1126/RV1126/prebuilts/gcc/linux-x86/arm/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.c:(.text+0x248): undefined reference to `drmModeGetConnector'
/home/xjt/SF6_RV1126/RV1126/prebuilts/gcc/linux-x86/arm/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.c:(.text+0x2d4): undefined reference to `drmModeSetCrtc'
/home/xjt/SF6_RV1126/RV1126/prebuilts/gcc/linux-x86/arm/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.c:(.text+0x2f0): undefined reference to `drmModeFreeConnector'
/home/xjt/SF6_RV1126/RV1126/prebuilts/gcc/linux-x86/arm/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.c:(.text+0x2f8): undefined reference to `drmModeFreeResources'
collect2: error: ld returned 1 exit status
bin/CMakeFiles/drmDemo.dir/build.make:94: recipe for target 'bin/drmDemo' failed
make[2]: *** [bin/drmDemo] Error 1
CMakeFiles/Makefile2:85: recipe for target 'bin/CMakeFiles/drmDemo.dir/all' failed
make[1]: *** [bin/CMakeFiles/drmDemo.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
my cc tool chain is arm-linux-gnueabihf- whic is produced from Buildroot. And I use CMake to build my program. Here is my project tree:
.
├── CMakeLists.txt # 1
├── src
│ ├── main.c
│ └── CMakeLists.txt # 2
└── build
in CML1:
PROJECT(RV1126)
CMAKE_MINIMUM_REQUIRED(VERSION 3.5)
SET(CMAKE_C_COMPILER "/home/xjt/SF6_RV1126/RV1126/buildroot/output/rockchip_rv1126_rv1109_dcir/host/bin/arm-linux-gnueabihf-gcc")
ADD_SUBDIRECTORY(src bin)
in CML2:
SET(
SRC_LIST
main.c
)
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR/bin})
ADD_EXECUTABLE(drmDemo ${SRC_LIST})
I guess it's a linking problem, how should I modify CMake to link to libdrm?
As #Tsyvarev said, after ADD_EXECUTABLE() add LINK_LIBRARIES("....../lib/libdrm.so ") and TARGET_LINK_LIBRARIES(demo libdrm.so). Thanks again #Tsyvarev.
Apparently in tbb::flow the source_node has been deprecated, and starting in the 2021.1 version we are only supposed to use input_node. Simply replacing the class does not seem to work, though. I have a working code using source_node in version 2020.3. If I try using input_node I get a cryptic message.
It seems input_node expects Body to implement a function that takes a flow_control object. Is this the case? Otherwise what is wrong here?
I cannot seem to be able to run any example codes with input_body.
====================[ Build | capybara | Debug-System ]==========================
/home/nicolau/bin/clion-2020.1.1/bin/cmake/linux/bin/cmake --build /home/nicolau/src/capybara/cmake-build-debug-system --target capybara -- -j 9
Scanning dependencies of target capybara
[ 50%] Building CXX object CMakeFiles/capybara.dir/main.cpp.o
In file included from /home/nicolau/src/oneapi-tbb-2021.1-beta08/include/tbb/flow_graph.h:345:0,
from /home/nicolau/src/capybara/main.cpp:9:
/home/nicolau/src/oneapi-tbb-2021.1-beta08/include/tbb/detail/_flow_graph_body_impl.h: In instantiation of ‘Output tbb::detail::d1::input_body_leaf<Output, Body>::operator()(tbb::detail::d1::flow_control&) [with Output = std::tuple<cv::Mat, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > > >; Body = main(int, char**)::<lambda(imgtv&)>]’:
/home/nicolau/src/capybara/main.cpp:424:1: required from here
/home/nicolau/src/oneapi-tbb-2021.1-beta08/include/tbb/detail/_flow_graph_body_impl.h:88:66: error: no match for call to ‘(main(int, char**)::<lambda(imgtv&)>) (tbb::detail::d1::flow_control&)’
Output operator()(flow_control& fc) override { return body(fc); }
^
/home/nicolau/src/capybara/main.cpp:350:58: note: candidate: main(int, char**)::<lambda(imgtv&)>
tbb::flow::input_node<imgtv> src(g, [&](imgtv &v) -> bool {
^~~~
/home/nicolau/src/capybara/main.cpp:350:58: note: no known conversion for argument 1 from ‘tbb::detail::d1::flow_control’ to ‘imgtv& {aka std::tuple<cv::Mat, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > > >&}’
CMakeFiles/capybara.dir/build.make:82: recipe for target 'CMakeFiles/capybara.dir/main.cpp.o' failed
make[3]: *** [CMakeFiles/capybara.dir/main.cpp.o] Error 1
CMakeFiles/Makefile2:95: recipe for target 'CMakeFiles/capybara.dir/all' failed
make[2]: *** [CMakeFiles/capybara.dir/all] Error 2
CMakeFiles/Makefile2:102: recipe for target 'CMakeFiles/capybara.dir/rule' failed
make[1]: *** [CMakeFiles/capybara.dir/rule] Error 2
Makefile:138: recipe for target 'capybara' failed
make: *** [capybara] Error 2
Apparently the interface has changed compared to source_node, and the function is now supposed to take a flow_control reference and return the new input object as output.
https://github.com/oneapi-src/oneTBB/issues/270#issuecomment-683645172
i am using parrot Linux the latest version . i want to install/use a nano adapter (802.11n) USB
i tried several ways but i failed
tried 1
after trying this i found no other way to ask for help
the following error i am getting while using make && make install
└──╼ #sudo make && make install
make -C tools
make[1]: Entering directory '/home/ano/Downloads/linux/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory '/home/ano/Downloads/linux/tools'
/home/ano/Downloads/linux/tools/bin2h
cp -f os/linux/Makefile.6 /home/ano/Downloads/linux/os/linux/Makefile
make -C /lib/modules/4.1.8-parrot-686-pae/build SUBDIRS=/home/ano/Downloads/linux/os/linux modules
make[1]: Entering directory '/usr/src/linux-headers-4.1.8-parrot-686-pae'
CC [M] /home/ano/Downloads/linux/os/linux/../../os/linux/rt_profile.o
/home/ano/Downloads/linux/os/linux/../../os/linux/rt_profile.c: In function ‘announce_802_3_packet’:
/home/ano/Downloads/linux/os/linux/../../os/linux/rt_profile.c:331:16: warning: unused variable ‘pAd’ [-Wunused-variable]
RTMP_ADAPTER *pAd = (RTMP_ADAPTER *)pAdSrc;
^
CC [M] /home/ano/Downloads/linux/os/linux/../../sta/assoc.o
CC [M] /home/ano/Downloads/linux/os/linux/../../sta/auth.o
CC [M] /home/ano/Downloads/linux/os/linux/../../sta/auth_rsp.o
CC [M] /home/ano/Downloads/linux/os/linux/../../sta/sync.o
/home/ano/Downloads/linux/os/linux/../../sta/sync.c: In function ‘PeerBeacon’:
/home/ano/Downloads/linux/os/linux/../../sta/sync.c:2180:12: warning: passing argument 8 of ‘StaAddMacTableEntry’ from incompatible pointer type
ie_list,
^
In file included from /home/ano/Downloads/linux/include/rt_config.h:59:0,
from /home/ano/Downloads/linux/os/linux/../../sta/sync.c:28:
/home/ano/Downloads/linux/include/rtmp.h:7892:9: note: expected ‘struct IE_LISTS *’ but argument is of type ‘struct BCN_IE_LIST *’
BOOLEAN StaAddMacTableEntry(
^
CC [M] /home/ano/Downloads/linux/os/linux/../../sta/sanity.o
CC [M] /home/ano/Downloads/linux/os/linux/../../sta/rtmp_data.o
/home/ano/Downloads/linux/os/linux/../../sta/rtmp_data.c: In function ‘STAHandleRxDataFrame’:
/home/ano/Downloads/linux/os/linux/../../sta/rtmp_data.c:523:33: warning: passing argument 2 of ‘MacTableLookup’ from incompatible pointer type
pEntry = MacTableLookup(pAd, &pHeader->Addr2);
^
In file included from /home/ano/Downloads/linux/include/rt_config.h:59:0,
from /home/ano/Downloads/linux/os/linux/../../sta/rtmp_data.c:28:
/home/ano/Downloads/linux/include/rtmp.h:8429:18: note: expected ‘UCHAR *’ but argument is of type ‘UCHAR (*)[6]’
MAC_TABLE_ENTRY *MacTableLookup(RTMP_ADAPTER *pAd, UCHAR *pAddr);
^
CC [M] /home/ano/Downloads/linux/os/linux/../../sta/connect.o
CC [M] /home/ano/Downloads/linux/os/linux/../../sta/wpa.o
CC [M] /home/ano/Downloads/linux/os/linux/../../sta/sta_cfg.o
/home/ano/Downloads/linux/os/linux/../../sta/sta_cfg.c: In function ‘RTMPIoctlRF’:
/home/ano/Downloads/linux/os/linux/../../sta/sta_cfg.c:5306:7: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 5 has type ‘LONG’ [-Wformat=]
sprintf(msg+strlen(msg), "BANK%d_R%02d:%02X ", bank_Id, rfId, rfValue);
^
/home/ano/Downloads/linux/os/linux/../../sta/sta_cfg.c:5359:27: warning: passing argument 2 of ‘RtmpDrvAllRFPrint’ from incompatible pointer type
RtmpDrvAllRFPrint(NULL, msg, strlen(msg));
^
In file included from /home/ano/Downloads/linux/include/rt_config.h:64:0,
from /home/ano/Downloads/linux/os/linux/../../sta/sta_cfg.c:28:
/home/ano/Downloads/linux/include/rt_os_util.h:668:6: note: expected ‘UINT32 *’ but argument is of type ‘PSTRING’
VOID RtmpDrvAllRFPrint(
^
/home/ano/Downloads/linux/os/linux/../../sta/sta_cfg.c:5209:22: warning: unused variable ‘rf_bank’ [-Wunused-variable]
UCHAR regRF = 0, rf_bank = 0;
^
/home/ano/Downloads/linux/os/linux/../../sta/sta_cfg.c: In function ‘RTMPIoctlShow’:
/home/ano/Downloads/linux/os/linux/../../sta/sta_cfg.c:5766:85: error: macro "__DATE__" might prevent reproducible builds [-Werror=date-time]
snprintf(extra, size, "Driver version-%s, %s %s\n", STA_DRIVER_VERSION, __DATE__, __TIME__ );
^
/home/ano/Downloads/linux/os/linux/../../sta/sta_cfg.c:5766:95: error: macro "__TIME__" might prevent reproducible builds [-Werror=date-time]
snprintf(extra, size, "Driver version-%s, %s %s\n", STA_DRIVER_VERSION, __DATE__, __TIME__ );
^
/home/ano/Downloads/linux/os/linux/../../sta/sta_cfg.c: In function ‘RtmpIoctl_rt_ioctl_siwgenie’:
/home/ano/Downloads/linux/os/linux/../../sta/sta_cfg.c:7610:13: warning: assignment from incompatible pointer type
eid_ptr = pAd->StaCfg.pWpaAssocIe;
^
cc1: some warnings being treated as errors
scripts/Makefile.build:258: recipe for target '/home/ano/Downloads/linux/os/linux/../../sta/sta_cfg.o' failed
make[2]: *** [/home/ano/Downloads/linux/os/linux/../../sta/sta_cfg.o] Error 1
Makefile:1384: recipe for target '_module_/home/ano/Downloads/linux/os/linux' failed
make[1]: *** [_module_/home/ano/Downloads/linux/os/linux] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.1.8-parrot-686-pae'
Makefile:394: recipe for target 'LINUX' failed
make: *** [LINUX] Error 2
can one please check and help me on it ....
I got that error, too, on a fresh Debian installation, despite being able to make that driver flawlessly a few times before.
Some problems were gone when I edited the os/linux/config.mk file as per the README file included in the driver folder, but then, new ones occured, considering something about the DATE and TIME functions.
I found that the solution is to install package firmware-ralink that also contains drivers for your USB Wireless dongle.
On my Debian Jessie installation, it said that firmware-ralink package is now included in the firmware-non-free package.
static const struct inode_operations msdos_dir_inode_operations = {
.create = msdos_create,
.lookup = msdos_lookup,
.unlink = msdos_unlink,
.mkdir = msdos_mkdir,
.rmdir = msdos_rmdir,
.rename = msdos_rename,
.setattr = fat_setattr,
.getattr = fat_getattr,
.compat_ioctl = my_ioctl, ---->error
};
i also tried with unlocked_ioctl but same error occured
[root#localhost fat]# make
make -C /lib/modules/3.11.10-100.fc18.x86_64/build M=/home/aditya/linux-3.12.6/fs/fat modules
make[1]: Entering directory `/usr/src/kernels/3.11.10-100.fc18.x86_64'
CC [M] /home/aditya/linux-3.12.6/fs/fat/namei_msdos.o
/home/aditya/linux-3.12.6/fs/fat/namei_msdos.c:646:2: error: unknown field ‘compat_ioctl’ specified in initializer
/home/aditya/linux-3.12.6/fs/fat/namei_msdos.c:646:2: warning: initialization from incompatible pointer type [enabled by default]
/home/aditya/linux-3.12.6/fs/fat/namei_msdos.c:646:2: warning: (near initialization for ‘msdos_dir_inode_operations.setxattr’) [enabled by default]
make[2]: * [/home/aditya/linux-3.12.6/fs/fat/namei_msdos.o] Error 1
make[1]: * [module/home/aditya/linux-3.12.6/fs/fat] Error 2
make[1]: Leaving directory `/usr/src/kernels/3.11.10-100.fc18.x86_64'
make: * [all] Error 2
The ioctl has been changed for a reason and it would be best if you follow the kernel changes in your driver too. You can not use drivers compiled for one version in another.
The change is not too difficult one.
In the fops structure change
ioctl to unlocked_ioctl
and in the ioctl function in your driver, do not pass the inode pointer. That is all, the rest of the code can remain the same.
see this tutorial for more details
I am trying to compile libframe. When I do, I receive the following messages.
BaseException.cpp: In constructor 'BaseException::BaseException()':
BaseException.cpp:30:33: error: 'strcpy' was not declared in this scope
BaseException.cpp: In constructor 'BaseException::BaseException(const char*)':
BaseException.cpp:35:31: error: 'strncpy' was not declared in this scope
BaseException.cpp: In constructor 'BaseException::BaseException(std::string&)':
BaseException.cpp:41:39: error: 'strncpy' was not declared in this scope
BaseException.cpp: In static member function 'static BaseException BaseException::factory(const char*, ...)':
BaseException.cpp:49:31: error: 'memset' was not declared in this scope
make[1]: *** [BaseException.o] Error 1
make[1]: Leaving directory `/home/alanc/media_man/libframe/libframe-1.0.0/src'
make: *** [all-recursive] Error 1
I am having trouble finding any information about this program.
libframe
Thanks.