Missing "HISTORY_STATE" and "history_get_history_state()" symbols

436 views
Skip to first unread message

Ed K

unread,
Feb 26, 2026, 4:28:37 AMFeb 26
to SAC Community
I am attempting to compile SAC from source (sac-102.0.tar.gz) and am seeing some undefined symbols, HISTORY_STATE and history_get_history_state(), referenced in history.c in the function length_history. The file History.doc refers to a file called history.h but there is no such file. It probably should read sac_history.h but that file doesn't define those symbols either. I wonder if I have a defective tarball. Any thoughts?

Ed K

Clifford Thurber

unread,
Feb 26, 2026, 10:08:56 AMFeb 26
to Ed K, Community SAC
Ed,

I think you will have a better chance of getting useful help if you paste in the error and its context during the installation along with the computer type and operating system you are using.

Cliff

On Feb 26, 2026, at 3:28 AM, Ed K <ed...@outlook.com> wrote:

I am attempting to compile SAC from source (sac-102.0.tar.gz) and am seeing some undefined symbols, HISTORY_STATE and history_get_history_state(), referenced in history.c in the function length_history. The file History.doc refers to a file called history.h but there is no such file. It probably should read sac_history.h but that file doesn't define those symbols either. I wonder if I have a defective tarball. Any thoughts?

Ed K

--
More info on EarthScope mailing lists: https://www.earthscope.org/news/mailing-lists/
---
You received this message because you are subscribed to the Google Groups "SAC Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sac-communit...@earthscope.org.
To view this discussion visit https://groups.google.com/a/earthscope.org/d/msgid/sac-community/94f54b6c-4ef5-4699-8bdd-10063a8bd8ban%40earthscope.org.

Ed K

unread,
Feb 27, 2026, 4:13:14 PM (13 days ago) Feb 27
to SAC Community, Clifford Thurber, Community SAC, Ed K
Thanks, Stephen and Cliff. I am helping a user of the SAC code to install it on a Penguin HPC running RHEL. At this point configure recognizes some missing libraries so I am running this configure from my build directory to bypass that problem.

../configure --prefix=${INSTALL} \
 CC=gcc CXX=g++ \
--disable-editing

Configure seems happy so I run "make" which ends with the errors I mentioned. The gcc version is 8.5.0 (old, but its version doesn't appear relevant):

. . .

gcc -DHAVE_CONFIG_H -I. -I../../src -I../inc    -fPIC        -I/usr/include/libxml2  -I../../inc -I../..  -I../../evalresp/libsrc  -Wall -Wextra  -D_GNU_SOURCE  -c -o history/history.o ../../src/history/history.c
../../src/history/history.c: In function 'read_history':
../../src/history/history.c:144:20: warning: unused parameter 'file' [-Wunused-parameter]
 read_history(char *file) {
              ~~~~~~^~~~
../../src/history/history.c: In function 'stifle_history':
../../src/history/history.c:148:20: warning: unused parameter 'size' [-Wunused-parameter]
 stifle_history(int size) {
                ~~~~^~~~
../../src/history/history.c: In function 'length_history':
../../src/history/history.c:244:5: error: unknown type name 'HISTORY_STATE'; did you mean 'HISTORY_COMMAND'?
     HISTORY_STATE *stat = history_get_history_state();
     ^~~~~~~~~~~~~
     HISTORY_COMMAND
../../src/history/history.c:244:27: warning: implicit declaration of function 'history_get_history_state' [-Wimplicit-function-declaration]
     HISTORY_STATE *stat = history_get_history_state();
                           ^~~~~~~~~~~~~~~~~~~~~~~~~
../../src/history/history.c:244:27: warning: initialization of 'int *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
../../src/history/history.c:245:16: error: request for member 'length' in something not a structure or union
     return stat->length;
                ^~
../../src/history/history.c: In function 'sac_history_load':
../../src/history/history.c:286:5: warning: implicit declaration of function 'add_history'; did you mean 'read_history'? [-Wimplicit-function-declaration]
     add_history("** SAC Session Started");
     ^~~~~~~~~~~
     read_history
../../src/history/history.c:288:5: warning: implicit declaration of function 'remove_history'; did you mean 'read_history'? [-Wimplicit-function-declaration]
     remove_history(n-1);
     ^~~~~~~~~~~~~~
     read_history
../../src/history/history.c: In function 'length_history':
../../src/history/history.c:246:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
make[1]: *** [Makefile:3181: history/history.o] Error 1
make[1]: Leaving directory '/p/work1/kornkven/sac-102.0/build/src'
make: *** [Makefile:557: all-recursive] Error 1

The symbols HISTORY_STATE and  history_get_history_state() appear nowhere in the tarball that I have, which led me to wonder if I mine might be messed up.

Ed

Ed K

unread,
Feb 27, 2026, 4:13:15 PM (13 days ago) Feb 27
to SAC Community, Clifford Thurber, Community SAC, Ed K
Thank you, Stephen and Cliff, for your replies.

I am helping a SAC user install v. 102.0 from the source tarball
sac-102.0.tar.gz on a Penguin HPC running RHEL. The current configuration
is using gcc 8.5.0, a pretty old version but the compiler version doesn't
appear to be relevant.

The configure, which disables editing for the moment to avoid a missing library
runs without complaint:


../configure --prefix=${INSTALL} \
    CC=gcc CXX=g++ \
    --disable-editing

However the make hits an error when it gets to history.c:
The missing symbols, HISTORY_STATE and history_get_history_state, are defined
nowhere in the code that I have which is what made me wonder if I somehow got a
defective tarball. The src/history/History.doc file refers to a file called
"history.h" being added to src/main/sac.c but that is incorrect. I assume that
this is actually "sac_history.h" which I do have (and which carries the internal
label "history.h"), but that file doesn't define those symbols. So it seems that there
are some components that are at a minimum not up-to-date in my copy.

Thanks for your input.

Ed K

On Thursday, February 26, 2026 at 8:08:56 AM UTC-7 Clifford Thurber wrote:
Reply all
Reply to author
Forward
0 new messages