Menu

Error compiling ultradefrag on Linux (Ubuntu)

Help
Brad Baker
2014-03-04
2017-11-22
  • Brad Baker

    Brad Baker - 2014-03-04

    I am trying to compile ultradefrag for use on ubuntu to defrag my ntfs volumes. I have ntfs-3g-dev and ntfs-3g packages installed. But when I run a make in the ultradefrag src folder I get the following error:

    cd wincalls; make wincalls.a
    make[1]: Entering directory /home/myuser/Desktop/ultradefrag-5.0.0AB.7/src/wincalls' gcc -DLXGC=1 -O2 -I/usr/include/ntfs-3g -I/usr/include -I../include -I../dll/zenwinx -c ntfs-3g.c ntfs-3g.c: In function ‘ntfs_open’: ntfs-3g.c:147:27: error: ‘MS_RDONLY’ undeclared (first use in this function) vol = ntfs_mount(device,MS_RDONLY); ^ ntfs-3g.c:147:27: note: each undeclared identifier is reported only once for each function it appears in make[1]: *** [ntfs-3g.o] Error 1 make[1]: Leaving directory/home/myuser/Desktop/ultradefrag-5.0.0AB.7/src/wincalls'
    make: *** [wincalls.a] Error 2

    Why am I getting this error and how can I work around it?

    Thanks
    Brad

     
    • Scott A. Conway

      Scott A. Conway - 2014-12-10

      Actually, there is a quick and easy solution to your problem, that is assuming you have the file "/usr/include/linux/fs.h" on your system.
      Apply the attached patch from within the directory where the root Makefile is.
      You will almost certainly want to edit the patch before applying it to reflect exactly where your specific system's "crtbegin.o" file is.
      My system is a 64-bit Slackware system, so I needed to modify my Makefile by looking in /usr/lib64/gcc/x86_64-slackware-linux/4.9.2.
      I strongly advise that you find exactly where yours is, edit the patch, then apply it.
      It should build with no problem at all after that.
      I just built it on my system with the changes in this patch, and I'm using it to defrag my Windows 8.1 NTFS partition as I type this.
      Good luck.

       
  • Stefan Pendl

    Stefan Pendl - 2014-03-04

    UltraDefrag is a Windows only program and was never tested nor compiled on anything else but Windows.

    Any question about an unofficial port must be asked at the site the unofficial source code has been downloaded from.

    Sorry for the inconvenience.


    Stefan

     
  • Brad Baker

    Brad Baker - 2014-03-04

    Sorry about that - I assumed the port was by the original author(s).

    I'll inquire on the Tuxera forums (http://tuxera.com/forum/)

    Thanks for the reply,
    Brad

     
  • Eduardo Oliveira

    I know here is not exactly the place to post it (because it is a forum for UltraDefrag for Windows, not from the Linux port), but for anyone that comes here, I had to change udefrag.patch from Scott A. Conway attachment to build it on Deepin 15.5 Beta (based on Debian "Sid" x86_64). I had to install the following dependencies to build it from source too:

    sudo apt-get install ntfs-3g-dev libncurses5-dev libncursesw5-dev
    unzip ultradefrag-5.0.0AB.7.zip
    patch -p 0 -i udefrag.patch
    cd ultradefrag-5.0.0AB.7/src
    make

    After "make", copy "udefrag" to /usr/local/bin to run it from Terminal without informing it's full path (just type "udefrag /dev/sdd1", where sdd1 is your NTFS partition)

    Hope I could help someone.

     

Log in to post a comment.