LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-03-2020, 09:45 PM   #1
burning
Member
 
Registered: Jan 2020
Location: Canada
Distribution: Slackware
Posts: 273

Rep: Reputation: Disabled
Veracrypt compile error " 'major' was not declared in this scope"


Running Slackware -current 32-bit on a 32-bit machine. Output of the compiling process and error message:
Code:
Compiling Directory.cpp
Compiling File.cpp
Compiling FilesystemPath.cpp
Unix/FilesystemPath.cpp: In member function ‘VeraCrypt::FilesystemPath VeraCrypt::FilesystemPath::ToHostDriveOfPartition() const’:
Unix/FilesystemPath.cpp:84:49: error: ‘major’ was not declared in this scope
   84 |      linkPathName += StringConverter::ToSingle (major (st.st_rdev)) + string (":") + StringConverter::ToSingle (minor (st.st_rdev));
      |                                                 ^~~~~
Unix/FilesystemPath.cpp:84:113: error: ‘minor’ was not declared in this scope
   84 |      linkPathName += StringConverter::ToSingle (major (st.st_rdev)) + string (":") + StringConverter::ToSingle (minor (st.st_rdev));
      |                                                                                                                 ^~~~~
make[1]: *** [/tmp/SBo/veracrypt-1.22/src/Build/Include/Makefile.inc:25: Unix/FilesystemPath.o] Error 1
make: *** [Makefile:372: all] Error 2
What exactly is it saying went wrong? I'm not too familiar with C or compiler errors in general. I can't tell what the cause of the problem is or what the problem itself even is really.
 
Old 10-04-2020, 11:47 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Seems that veracrypt-1.22 behaves buggy with a contemporary OS.
Suggest : Try out veracrypt-1.24.6 (Used in CentOS 8.)
Link https://codeload.github.com/veracryp...t_1.24-Update6
→ "VeraCrypt-VeraCrypt_1.24-Update6.tar.gz"

Example Slackbuild: veracrypt-1.24.6.tar.gz ( 2.2 kB )
https://www.dropbox.com/s/me3q98s0fg....6.tar.gz?dl=0

P.S.: `makeself´ https://slackbuilds.org/repository/1...earch=makeself
... is required.

-

Last edited by knudfl; 10-04-2020 at 06:02 PM.
 
1 members found this post helpful.
Old 05-16-2021, 10:06 PM   #3
burning
Member
 
Registered: Jan 2020
Location: Canada
Distribution: Slackware
Posts: 273

Original Poster
Rep: Reputation: Disabled
Talking

Quote:
Originally Posted by knudfl View Post
Seems that veracrypt-1.22 behaves buggy with a contemporary OS.
Suggest : Try out veracrypt-1.24.6 (Used in CentOS 8.)
Link https://codeload.github.com/veracryp...t_1.24-Update6
→ "VeraCrypt-VeraCrypt_1.24-Update6.tar.gz"

Example Slackbuild: veracrypt-1.24.6.tar.gz ( 2.2 kB )
https://www.dropbox.com/s/me3q98s0fg....6.tar.gz?dl=0

P.S.: `makeself´ https://slackbuilds.org/repository/1...earch=makeself
... is required.

-
Thank you very much! I'll compare the two scripts to try an discern the differences but if you wouldn't mind, could you give me a brief rundown of how you went about altering the script to get it to work? It looked like it was a bit more than just a version number change. Did you write the slackbuild up completely from scratch?
 
Old 05-17-2021, 04:58 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #3 : As far as I remember (a year back) it was "do and try".
Name and version was changed.
The source code had an odd name (VeraCrypt-VeraCrypt). Script edited.
The "doc" section didn't work. Omitted, but "doc" created OK anyway ?

See `diff's´ for yourself : + means added, - means delete ....
Code:
$ diff -dbBwaur old-1.22-veracrypt.SlackBuild VeraCrypt.SlackBuild 
--- old-1.22-veracrypt.SlackBuild       2018-04-28 01:46:33.000000000 +0200
+++ VeraCrypt.SlackBuild        2020-10-04 18:24:08.013338640 +0200
@@ -22,8 +22,8 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 # THE SOFTWARE.
 
-PRGNAM=veracrypt
-VERSION=${VERSION:-1.22}
+PRGNAM=VeraCrypt
+VERSION=${VERSION:-1.24-Update6}
 BUILD=${BUILD:-1}
 TAG=${TAG:-_SBo}
 
@@ -61,7 +61,7 @@
 cd $TMP
 rm -rf $PRGNAM-$VERSION
 mkdir $PRGNAM-$VERSION
-tar xvf $CWD/VeraCrypt_${VERSION}_Source.tar.bz2 -C $PRGNAM-$VERSION
+tar xvf $CWD/VeraCrypt-VeraCrypt_${VERSION}.tar.gz -C $PRGNAM-$VERSION
 cd $PRGNAM-$VERSION
 
 chown -R root:root .
@@ -71,7 +71,7 @@
  \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
   -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
 
-cd src
+cd VeraCrypt-VeraCrypt_1.24-Update6/src
 make
 make package
 cp -av Setup/Linux/usr $PKG
@@ -80,12 +80,7 @@
 find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
   | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
 
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a \
-  $PKG/usr/share/veracrypt/doc/* \
-  $PKG/usr/doc/$PRGNAM-$VERSION
-rm -rf $PKG/usr/share/veracrypt
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
 
 mkdir -p $PKG/install
 cat $CWD/slack-desc > $PKG/install/slack-desc
 
1 members found this post helpful.
  


Reply

Tags
veracrypt



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
g++ in ubuntu 64bit encounter "not declared in this scope" ansonc Linux - Software 6 12-01-2014 08:59 PM
g++ in ubuntu 64bit encounter "not declared in this scope" ansonc Linux - Software 1 11-27-2014 04:13 AM
error: was not declared in this scope compilation error i_r_tomash Linux - Software 2 05-27-2010 11:00 AM
g++ & "error: 'error' was not declared in this scope" WetFroggy Programming 4 09-27-2009 02:08 AM
Errors while compiling Faust: "PATH_MAX was not declared in this scope" prasadbrg Linux - Software 6 12-15-2008 01:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration