-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ubuntu 20.04 support #110
Comments
I am actually facing the same issue with Ubuntu 18.04. Does anyone have any updates on this? |
@ParthPratim is looking into fixing this; he will update any progress here (collaborators would be welcome). |
Possibly relevant: https://sourceware.org/bugzilla/show_bug.cgi?id=20191 It seems like disabling the vtables hardening is a possible solution (if that can be done). Another possibility is to maintain and build a patched glibc for use with DCE. |
I tried building glibc release 2.23 on an Ubuntu-20.04 machine but it fails with the following error:
I'm trying to find some way to get it to build. I'll also try disabling vtables hardening, if that's possible. |
IIRC that's a documented error, as in you need to add gettid to DCE. Btw do you need selinux ? this seems like a painful dep to have with dce |
The error with selinux comes up when I tried to build the glibc release 2.23, not the DCE source. I'm thinking of building the __libc_fatal ("Fatal error: glibc detected an invalid stdio handle\n"); This line causes the DCE scripts to stop execution when it detects any tampering with the vtable. I've generated the custom glibc as a proper system root against which DCE could be built. |
Thanks for looking into this. I am just wondering, does this issue prevent ns3-dce from working at all? I tried dce-udp-simple and dce-iperf, and I was wondering if all other binaries would fail as well (I believe the answer is yes). |
All the binaries are likely to fail because the issue arises due to stack smashing used in DCE which is why Glibc throws the |
Can someone try to add the flag '-fvtable-verify=none' to cxxflags and see if it helps? Perhaps search the ns-3-dce/wscript and add this flag wherever there is a setting of 'cxxflags' variable? Perhaps other options are possible from here? |
Hey, I just followed your suggestion and ran into the same issue... |
After browsing the glibc source a bit today, I'm skeptical we can fix this with a linker option. Perhaps static linking would fix it, but I don't think we want to do that. So it seems like the options are that we build a custom glibc for ourselves (downside-- a complicated build, reported to need 5.5GB disk space), or explore whether some other libc can be used instead: http://www.etalabs.net/compare_libcs.html We could also ask glibc maintainers about a linker flag to disable this check (in future releases). |
Mmm... I wonder how hard it would be to change libc to musl. Even just using a custom glibc seems hard enough for me. Thanks for your help nonetheless! |
BTW, I am able to successfully run DCE with Ubuntu 16.04 (not sure if this was public knowledge). |
Yes, 16.04 is the distribution that I presently use for DCE. |
I just found a way to setup a custom Glibc 2.25 and make NS-3 and DCE build from it, on Ubuntu 20.04. Almost all examples work correctly(haven't tested all of them) and the error which used to pop up, doesn't show up now. Steps to reproduce the same : Bake Setup
Bake Build
Testing DCE
Source References :https://gitlab.com/ParthPratim1/bake/-/tree/glibc-build Successful Run : |
dblessed@ubuntu:~/bake$ python3 bake.py build -vvv
|
The error you ran into might be a dependency problem. Please let me know the output of these commands so I that can help you out better :
|
This is my reply... sorry for the long script configure: running configure fragment for add-on libidn |
The configure script output seems fine to me. This is pretty strange to me, as I did a fresh install a few days back, and it worked fine. You might want to try running I'll try doing a fresh install again to see if I can reproduce the same issue. |
Hi thank you for the reply. I did as you suggested and ran the above two lines. Glibc built but later terminated and failed to finish the build process. These were the last lines of the entire build -Wl,--as-needed /home/dblessed/bake/build/glibc-build/elf/ld.so -Wl,--no-as-needed -lgcc
|
Are you on Ubuntu 20.04 ? Cause I'm using that, and it builds fine. |
Yes i am on ubuntu 20 i have built again and this is what i get still on glibc
|
Can you please send me the output of : |
dblessed@ubuntu: /bake$ lsb_release -a dblessed@ubuntu: /bake$ ldd --version ldd |
It's pretty strange because it builds on Ubuntu 20.04.1 with the same Glibc version as yours. Can you please attach the output of :
|
though I am also missing this
|
You can fix that with :
|
|
which of the two should I use? Should I include -e
python3 bake.py configure -e dce-linux-dev |
Oops, I missed it. |
okay |
Hello Parth and Tom, I attempted to build the DCE with the instructions above and was greeted with a glibc-2.31 building issue for the file "glibc-2.31-disable-security-checks.patch" is not available. Checked the source from GitHub, it seems that the specific file is not at https://github.com/direct-code-execution/ns-3-dce/tree/master/utils. Could you please enlighten me on what I need to do to resolve the issue? Below are the steps I did and additional steps are marked with bullets at the beginning of lines. Provisioning
// After restarting the system, I started with the instructions listed at the above post. Bake Setup
Bake Build
// Resolve dependencies
// The file on the path
// As acceptable files of libc-debug from
Error Encountered Technical Details Here are the detailed outputs of my setup.
Would it be suggested that I install the 2.25 version of libc instead of the package maintainers' (via Thanks! Much appreciated! Regards, Andy |
@TheRealSonicFan The glibc-build branch wouldn't build as of now because the repositories are being pointed to upstream, as they are currently in the process of getting reviewed for a probable merge. You can try out the
And then proceed with the usual installation steps. Let me know if you face any issues. |
@ParthPratim Hi Parth. Thanks for your help. :D The program finally compiled and most of the examples worked except the LTE-based ones. I compiled the DCE with the parameter of In addition, it seems that the |
Thanks for the report. I could reproduce a SIGSEGV on both Ubuntu 16.04 and Ubuntu 20.04, so it's probably an issue from the past. I'll try to take a look at it, I don't have much idea about this at this point.
That's because it doesn't look for simulation sources, because someone could have multiple source files which compiles together to make one final simulation executable (for example our test suites like dce-process-manager). waf would look up the simulation executable from the bin_dce folder of ours and then execute it after it has setup the required execution environment, loaded required libraries (dce's libc, etc.), and then would spawn the simulation executable. |
I filed issue #122 to track these example program failures (separate from Ubuntu 20.04 support). |
Thanks for your work! I'm on a fresh Ubuntu 20.04. But bake doesn't find libc. It's on branch glibc-build-self.
Is something missing for downloading? |
The maintainers are working on an official release for DCE which would start supporting Ubuntu-20.04. Please enter your bake directory, and try executing the following commands. git pull
rm bakefile.xml
./bake.py configure -e dce-linux-dev
./bake.py download -vvv
./bake.py build -vvv |
After |
Hello @KeyiJJJ, I haven't tried to fix ccnx, as it doesn't seem to be supported any longer (no commits for 9 years). I don't plan to support it going forward. |
Current (July 2022) recipe for testing Ubuntu 20.04 future DCE release 1.12:
At this point, there are two targets to configure: 1)
All tests should pass except the two related to CCNX (which is not supported)-- see above. Caution: you will need about 15 GB of disk space to build it all. We plan to provide a Docker image that is more space-efficient. |
DearTomhenderson,
Could you please help me to solve this problem? |
If a non-verbose build fails, try to build with verbose output and redirect the output to a file, and inspect that file later to see what the failure was.
|
Thanks a lot for your response. Thanks |
Dear Tomhenderson and ParthPratim, build output :
Thanks & Regards, |
ccnx and elf-loader are not supported in this version. I am not sure whether anyone uses CCNX, so I doubt that it will be restored unless someone provides a patch. elf-loader will hopefully be fixed because it provides performance improvements, but again a patch is wanted. |
Hi @tomhenderson Tomhenderson and @ParthPratim , find the console output : git clone https://gitlab.com/tomhenderson/bake.git
Thanks & Regards, |
I think that |
Thanks @tomhenderson for the great support on getting DCE working for Ubuntu 20.04. |
I am having this error trying to install dce please help. I am on Ubuntu 20.04 ` >> Building dce-linux-1.12 - Problem
|
Please retry with 'bake.py build -vvv' and provide more information about the build error. |
Thank you for your response. Now it is failing while building ns-3.35
|
Are you sure that you haven't run out of disk space, or have a file permissions problem? Those errors might be suggestive of that. If not, running the build with the '-vvv' option should show more information about exactly what failed. |
Thank you! I think that is it. Thanks for your response |
Description of the problem
Branch to reproduce error: ubuntu-20.04-changes
On running the dce-iperf script on Ubuntu-20.04:
It throws the following error with Glibc:
output of ./waf configure
Steps to reproduce
I have managed to build DCE on an Ubuntu-20.04 machine and have also mentioned the Github branch below to reproduce the same.
bake.py build
Things I did to get the DCE code to build :
libio.h
and_G_config.h
header files were missing from Ubuntu-20.04 systems which implemented the_IO_getc
and_IO_putc
functions as required inlibc-ns3.h
. Bug ReportDCE(_IO_getc)
andDCE(_IO_putc)
fromlibc-ns3.h
.cstdarg.h
to replace_G_va_list
with__gnuc_va_list
.linux/sockios.h
to enable support forSIOCGSTAMP
intest/test-socket.c
.bake.py show
showinglibc6-dbg
requirement not satisfied was thrown because it isn't looking forld-2.31.so
and can be resolved by applying the following patch. Just download this patch and rungit apply bake.patch
bake.py configure -e dce-linux-dev
After building DCE when I ran the
dce-iperf
example it throws the following errorFatal error: glibc detected an invalid stdio handle
I'm trying to work on this issue and would highly appreciate support from the DCE community.
Similar Issue : #57
The text was updated successfully, but these errors were encountered: