hackrf-spectrum-analyzer icon indicating copy to clipboard operation
hackrf-spectrum-analyzer copied to clipboard

compiling error...

Open protektwar opened this issue 4 years ago • 2 comments

Hi,

I'm trying to compile on an Ubuntu desktop, but looks like something is wrong...

$> sudo apt-get install gcc-multilib g++-multilib

I had to install multilib, as I had this error first:

----------- begin make error before multilib installation ------

Apr 01, 2020 7:08:45 PM com.ochafik.lang.jnaerator.JNAerator jnaerate
INFO: Include path : 
        .
        /usr/include
        /usr/local/include
        /usr/include/c++/7.5.0
        /usr/include/c++/7.5.0/tr1
Parsing native headers...
/usr/include/stdint.h:23:0: error: File not found: bits/libc-header-start.h in . /usr/include /usr/local/include /usr/include/c++/7.5.0 /usr/include/c++/7.5.0/tr1
/usr/include/stdint.h:24:0: error: File not found: bits/types.h in . /usr/include /usr/local/include /usr/include/c++/7.5.0 /usr/include/c++/7.5.0/tr1
/usr/include/stdint.h:25:0: error: File not found: bits/wchar.h in . /usr/include /usr/local/include /usr/include/c++/7.5.0 /usr/include/c++/7.5.0/tr1
/usr/include/stdint.h:26:0: error: File not found: bits/wordsize.h in . /usr/include /usr/local/include /usr/include/c++/7.5.0 /usr/include/c++/7.5.0/tr1
/usr/include/stdint.h:31:0: error: File not found: bits/stdint-intn.h in . /usr/include /usr/local/include /usr/include/c++/7.5.0 /usr/include/c++/7.5.0/tr1
/usr/include/stdint.h:34:0: error: File not found: bits/stdint-uintn.h in . /usr/include /usr/local/include /usr/include/c++/7.5.0 /usr/include/c++/7.5.0/tr1

----------- end make error before multilib installation ------

Error after multilib installation: ----------- begin make --------------------- $> make

Creating directories
mkdir -p build/lib/linux-x86-64
cp -f lib/program.ico lib/program.png build/lib/linux-x86-64/../
echo -e '#!/bin/bash\nDIRECTORY=`dirname $0`\njava -jar $DIRECTORY/lib/hackrf_sweep_spectrum_analyzer.jar' > build/hackrf_sweep_spectrum_analyzer.sh
chmod +x build/hackrf_sweep_spectrum_analyzer.sh
"java"  -Xmx1024M -jar ~/projects/other/hackrf-spectrum-analyzer/src/hackrf-sweep/lib/jnaerator/jnaerator-0.13-20150328.111636-4-shaded.jar -limitComments -emptyStructsAsForwardDecls -f  -skipLibraryInstance -runtime JNA -direct  -mode Jar -o lib -jar lib/hackrf-sweep-jna.jar -v -library "hackrf-sweep" ~/projects/other/hackrf-spectrum-analyzer/src/hackrf-sweep/lib/hackrf/host/hackrf-tools/src/hackrf_sweep.h 
Auto-configuring parser...
Apr 02, 2020 10:21:41 AM com.ochafik.lang.jnaerator.JNAeratorConfigUtils getProp
INFO: [environment] JNAERATOR_INCLUDE_PATH=.:/usr/include:/usr/local/include:/usr/include/c++/7.5.0:/usr/include/c++/7.5.0/tr1
Apr 02, 2020 10:21:41 AM com.ochafik.lang.jnaerator.JNAeratorConfigUtils getProp
INFO: [environment] JNAERATOR_FRAMEWORKS_PATH=/System/Library/Frameworks/CoreServices.framework/Versions/Current/Frameworks:/System/Library/Frameworks/ApplicationServices.framework/Versions/Current/Frameworks:/System/Library/Frameworks:/Library/Frameworks:/Local/Library/Frameworks/:~/Library/Frameworks
os.arch = amd64
Apr 02, 2020 10:21:41 AM com.ochafik.lang.jnaerator.JNAerator jnaerate
INFO: Include path : 
        .
        /usr/include
        /usr/local/include
        /usr/include/c++/7.5.0
        /usr/include/c++/7.5.0/tr1
Parsing native headers...
/usr/include/features.h:208:18: error: Unexpected operator ?
/usr/include/features.h:208:37: warning: Unexpected nonwhite token
/usr/include/features.h:208:43: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:273:45: error: Unexpected operator ?
/usr/include/sys/cdefs.h:273:61: error: missing ) in expression
/usr/include/sys/cdefs.h:273:61: error: missing ) in expression
/usr/include/sys/cdefs.h:273:61: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:273:60: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:273:61: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:273:61: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:273:71: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:273:73: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:273:73: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:273:85: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:273:85: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:273:86: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:273:86: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:273:87: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:273:87: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:285:67: error: Unexpected operator ?
/usr/include/sys/cdefs.h:285:83: error: missing ) in expression
/usr/include/sys/cdefs.h:285:83: error: missing ) in expression
/usr/include/sys/cdefs.h:285:83: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:285:82: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:285:83: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:285:83: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:285:93: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:285:94: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:285:94: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:285:95: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:285:107: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:285:107: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:285:108: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:285:109: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:285:109: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:285:110: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:285:111: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:285:117: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:285:131: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:285:131: warning: Unexpected nonwhite token
/usr/include/bits/wchar.h:31:52: warning: Unexpected nonwhite token
/usr/include/bits/wchar.h:31:52: warning: Unexpected nonwhite token
/usr/include/bits/wchar.h:31:52: warning: Unexpected nonwhite token
/usr/include/bits/wchar.h:31:52: warning: Unexpected nonwhite token
/usr/include/bits/wchar.h:33:52: warning: Unexpected nonwhite token
/usr/include/bits/wchar.h:33:52: warning: Unexpected nonwhite token
/usr/include/bits/wchar.h:33:52: warning: Unexpected nonwhite token
/usr/include/bits/wchar.h:33:52: warning: Unexpected nonwhite token
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Failed to convert define 'UINT64_MAX => (__UINT64_C(18446744073709551615)):
java.lang.NumberFormatException: For input string: "18446744073709551615"
Failed to convert define 'UINT_LEAST64_MAX => (__UINT64_C(18446744073709551615)):
java.lang.NumberFormatException: For input string: "18446744073709551615"
Failed to convert define 'UINT_FAST16_MAX => (18446744073709551615UL):
java.lang.NumberFormatException: For input string: "18446744073709551615"
Failed to convert define 'UINT_FAST32_MAX => (18446744073709551615UL):
java.lang.NumberFormatException: For input string: "18446744073709551615"
Failed to convert define 'UINT_FAST64_MAX => (__UINT64_C(18446744073709551615)):
java.lang.NumberFormatException: For input string: "18446744073709551615"
Failed to convert define 'UINTPTR_MAX => (18446744073709551615UL):
java.lang.NumberFormatException: For input string: "18446744073709551615"
Failed to convert define 'UINTMAX_MAX => (__UINT64_C(18446744073709551615)):
java.lang.NumberFormatException: For input string: "18446744073709551615"
Failed to convert define 'SIZE_MAX => (18446744073709551615UL):
java.lang.NumberFormatException: For input string: "18446744073709551615"
Now parsing 32 slices
Normalizing parsed code...
Writing raw parsed sources to '_jnaerator.rawParsed.cpp'
Writing normalized parsed sources to '_jnaerator.normalizedParsed.cpp'
Generating libraries...
Compiling JNAerated files...
Downloading file jrt:/java.base to ~/.jnaerator/temp/cache/java.basejava.io.IOException: cannot connect to jrt:/java.base
        at java.base/sun.net.www.protocol.jrt.JavaRuntimeURLConnection.connect(JavaRuntimeURLConnection.java:129)
        at java.base/sun.net.www.protocol.jrt.JavaRuntimeURLConnection.getInputStream(JavaRuntimeURLConnection.java:140)
        at java.base/java.net.URL.openStream(URL.java:1140)
        at com.ochafik.lang.compiler.CompilerUtils.getLocalFile(CompilerUtils.java:166)
        at com.ochafik.lang.compiler.CompilerUtils.getClassPath(CompilerUtils.java:105)
        at com.ochafik.lang.compiler.CompilerUtils.getClassPaths(CompilerUtils.java:127)
        at com.ochafik.lang.compiler.CompilerUtils.compile(CompilerUtils.java:187)
        at com.ochafik.lang.jnaerator.JNAerator.jnaerate(JNAerator.java:1030)
        at com.ochafik.lang.jnaerator.JNAerator$1.finished(JNAerator.java:786)
        at com.ochafik.lang.jnaerator.JNAeratorCommandLineArgs$ArgsParser.parse(JNAeratorCommandLineArgs.java:162)
        at com.ochafik.lang.jnaerator.JNAerator.main(JNAerator.java:791)
        at com.ochafik.lang.jnaerator.JNAerator.main(JNAerator.java:203)
java.io.IOException: cannot connect to jrt:/java.base
        at com.ochafik.lang.jnaerator.JNAerator$1$2.setFinished(JNAerator.java:753)
        at com.ochafik.lang.jnaerator.JNAerator.jnaerate(JNAerator.java:1066)
        at com.ochafik.lang.jnaerator.JNAerator$1.finished(JNAerator.java:786)
        at com.ochafik.lang.jnaerator.JNAeratorCommandLineArgs$ArgsParser.parse(JNAeratorCommandLineArgs.java:162)
        at com.ochafik.lang.jnaerator.JNAerator.main(JNAerator.java:791)
        at com.ochafik.lang.jnaerator.JNAerator.main(JNAerator.java:203)
#
# ERROR: JNAeration failed !
#
#       java.io.IOException: cannot connect to jrt:/java.base
#
"java"  -Xmx1024M -jar ~/projects/other/hackrf-spectrum-analyzer/src/hackrf-sweep/lib/jnaerator/jnaerator-0.13-20150328.111636-4-shaded.jar -limitComments -emptyStructsAsForwardDecls -f  -skipLibraryInstance -runtime JNA -direct  -mode Jar -o lib -jar libhackrf-jna.jar -v -library "hackrf-sweep"  ~/projects/other/hackrf-spectrum-analyzer/src/hackrf-sweep/lib/hackrf/host/libhackrf/src/hackrf.h 
Auto-configuring parser...
Apr 02, 2020 10:21:43 AM com.ochafik.lang.jnaerator.JNAeratorConfigUtils getProp
INFO: [environment] JNAERATOR_INCLUDE_PATH=.:/usr/include:/usr/local/include:/usr/include/c++/7.5.0:/usr/include/c++/7.5.0/tr1
Apr 02, 2020 10:21:43 AM com.ochafik.lang.jnaerator.JNAeratorConfigUtils getProp
INFO: [environment] JNAERATOR_FRAMEWORKS_PATH=/System/Library/Frameworks/CoreServices.framework/Versions/Current/Frameworks:/System/Library/Frameworks/ApplicationServices.framework/Versions/Current/Frameworks:/System/Library/Frameworks:/Library/Frameworks:/Local/Library/Frameworks/:~/Library/Frameworks
os.arch = amd64
Apr 02, 2020 10:21:43 AM com.ochafik.lang.jnaerator.JNAerator jnaerate
INFO: Include path : 
        .
        /usr/include
        /usr/local/include
        /usr/include/c++/7.5.0
        /usr/include/c++/7.5.0/tr1
Parsing native headers...
/usr/include/features.h:208:18: error: Unexpected operator ?
/usr/include/features.h:208:37: warning: Unexpected nonwhite token
/usr/include/features.h:208:43: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:273:45: error: Unexpected operator ?
/usr/include/sys/cdefs.h:273:61: error: missing ) in expression
/usr/include/sys/cdefs.h:273:61: error: missing ) in expression
/usr/include/sys/cdefs.h:273:61: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:273:60: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:273:61: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:273:61: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:273:71: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:273:73: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:273:73: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:273:85: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:273:85: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:273:86: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:273:86: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:273:87: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:273:87: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:285:67: error: Unexpected operator ?
/usr/include/sys/cdefs.h:285:83: error: missing ) in expression
/usr/include/sys/cdefs.h:285:83: error: missing ) in expression
/usr/include/sys/cdefs.h:285:83: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:285:82: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:285:83: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:285:83: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:285:93: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:285:94: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:285:94: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:285:95: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:285:107: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:285:107: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:285:108: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:285:109: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:285:109: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:285:110: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:285:111: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:285:117: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:285:131: warning: Unexpected nonwhite token
/usr/include/sys/cdefs.h:285:131: warning: Unexpected nonwhite token
/usr/include/bits/wchar.h:31:52: warning: Unexpected nonwhite token
/usr/include/bits/wchar.h:31:52: warning: Unexpected nonwhite token
/usr/include/bits/wchar.h:31:52: warning: Unexpected nonwhite token
/usr/include/bits/wchar.h:31:52: warning: Unexpected nonwhite token
/usr/include/bits/wchar.h:33:52: warning: Unexpected nonwhite token
/usr/include/bits/wchar.h:33:52: warning: Unexpected nonwhite token
/usr/include/bits/wchar.h:33:52: warning: Unexpected nonwhite token
/usr/include/bits/wchar.h:33:52: warning: Unexpected nonwhite token
Writing preprocessor output to '_jnaerator.preprocessed.c'
Writing preprocessor macros to '_jnaerator.macros.cpp'
Failed to convert define 'UINT64_MAX => (__UINT64_C(18446744073709551615)):
java.lang.NumberFormatException: For input string: "18446744073709551615"
Failed to convert define 'UINT_LEAST64_MAX => (__UINT64_C(18446744073709551615)):
java.lang.NumberFormatException: For input string: "18446744073709551615"
Failed to convert define 'UINT_FAST16_MAX => (18446744073709551615UL):
java.lang.NumberFormatException: For input string: "18446744073709551615"
Failed to convert define 'UINT_FAST32_MAX => (18446744073709551615UL):
java.lang.NumberFormatException: For input string: "18446744073709551615"
Failed to convert define 'UINT_FAST64_MAX => (__UINT64_C(18446744073709551615)):
java.lang.NumberFormatException: For input string: "18446744073709551615"
Failed to convert define 'UINTPTR_MAX => (18446744073709551615UL):
java.lang.NumberFormatException: For input string: "18446744073709551615"
Failed to convert define 'UINTMAX_MAX => (__UINT64_C(18446744073709551615)):
java.lang.NumberFormatException: For input string: "18446744073709551615"
Failed to convert define 'SIZE_MAX => (18446744073709551615UL):
java.lang.NumberFormatException: For input string: "18446744073709551615"
Now parsing 32 slices
Normalizing parsed code...
Writing raw parsed sources to '_jnaerator.rawParsed.cpp'
Writing normalized parsed sources to '_jnaerator.normalizedParsed.cpp'
Generating libraries...
Overwriting file '_jnaerator.choices'
Compiling JNAerated files...
Downloading file jrt:/java.base to ~/.jnaerator/temp/cache/java.basejava.io.IOException: cannot connect to jrt:/java.base
        at java.base/sun.net.www.protocol.jrt.JavaRuntimeURLConnection.connect(JavaRuntimeURLConnection.java:129)
        at java.base/sun.net.www.protocol.jrt.JavaRuntimeURLConnection.getInputStream(JavaRuntimeURLConnection.java:140)
        at java.base/java.net.URL.openStream(URL.java:1140)
        at com.ochafik.lang.compiler.CompilerUtils.getLocalFile(CompilerUtils.java:166)
        at com.ochafik.lang.compiler.CompilerUtils.getClassPath(CompilerUtils.java:105)
        at com.ochafik.lang.compiler.CompilerUtils.getClassPaths(CompilerUtils.java:127)
        at com.ochafik.lang.compiler.CompilerUtils.compile(CompilerUtils.java:187)
        at com.ochafik.lang.jnaerator.JNAerator.jnaerate(JNAerator.java:1030)
        at com.ochafik.lang.jnaerator.JNAerator$1.finished(JNAerator.java:786)
        at com.ochafik.lang.jnaerator.JNAeratorCommandLineArgs$ArgsParser.parse(JNAeratorCommandLineArgs.java:162)
        at com.ochafik.lang.jnaerator.JNAerator.main(JNAerator.java:791)
        at com.ochafik.lang.jnaerator.JNAerator.main(JNAerator.java:203)
java.io.IOException: cannot connect to jrt:/java.base
        at com.ochafik.lang.jnaerator.JNAerator$1$2.setFinished(JNAerator.java:753)
        at com.ochafik.lang.jnaerator.JNAerator.jnaerate(JNAerator.java:1066)
        at com.ochafik.lang.jnaerator.JNAerator$1.finished(JNAerator.java:786)
        at com.ochafik.lang.jnaerator.JNAeratorCommandLineArgs$ArgsParser.parse(JNAeratorCommandLineArgs.java:162)
        at com.ochafik.lang.jnaerator.JNAerator.main(JNAerator.java:791)
        at com.ochafik.lang.jnaerator.JNAerator.main(JNAerator.java:203)
#
# ERROR: JNAeration failed !
#
#       java.io.IOException: cannot connect to jrt:/java.base
#
rm -rf ~/projects/other/hackrf-spectrum-analyzer/src/hackrf-sweep/_jnaerator.*

----------- end make ---------------------

protektwar avatar Apr 02 '20 08:04 protektwar

I'm getting an identical error when compiling on Ubuntu 18.04.

Cabalist avatar Apr 18 '20 04:04 Cabalist

New release is out, try if it works, should not require compilation on ubuntu >> download

pavsa avatar Apr 18 '20 14:04 pavsa